Create organization sub account
Create a new sub account under the specified organization. You must have sub account management permissions for this organization.
post
Authorizations
Api-TokenstringRequired
Pass the API token in the Api-Token
Path parameters
organization_idinteger · int64 · min: 1RequiredExample:
Unique organization ID
1001Body
Responses
200
Sub account created successfully.
application/json
Represents a sub account within an organization
idintegerOptionalExample:
The unique identifier of the sub account
12345namestringOptionalExample:
The name of the sub account
Development Team Account400
Bad request - invalid parameters.
application/json
401
Returns unauthorized error message. Check your credentials.
application/json
403
Insufficient organization permissions or wrong organization.
application/json
422
Unprocessable entity - validation errors.
application/json
post/api/organizations/{organization_id}/sub_accounts
curl -X POST https://mailtrap.io/api/organizations/{organization_id}/sub_accounts \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"account": {
"name": "New Team Account"
}
}'
{
"id": 12347,
"name": "New Team Account"
}Last updated
Was this helpful?

