API REFERENCE
Create Organization
On this page
POST
/api/organizationsCreate a new organization. The creator is automatically added as a member of the organization.
Authentication
x-api-key in header
bearerAuth bearer
Request
cURL
curl --request POST \
--url 'https://api.recoupable.dev/api/organizations' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"name": "My New Label",
"accountId": "123e4567-e89b-12d3-a456-426614174000"
}'Request body required
Organization creation parameters
application/json
namestringrequiredThe name of the organization to create
accountIdstringrequiredThe account ID of the creator
format: uuid
Responses
200Organization created successfully+
application/json
statusstring · enumrequiredStatus of the request
Values: "success"
organizationobjectrequiredThe created organization
Properties for organization
idstringUUID of the new organization account
format: uuid
namestringName of the organization
400Bad request - missing required parameters+
application/json
statusstring · enumrequiredStatus of the request
Values: "error"
messagestringrequiredError message describing what went wrong
Full specification
Download the OpenAPI file for complete schemas, constraints, and examples.
Download accounts.jsonView operation source
json
{
"description": "Create a new organization. The creator is automatically added as a member of the organization.",
"security": [
{
"apiKeyAuth": []
},
{
"bearerAuth": []
}
],
"requestBody": {
"description": "Organization creation parameters",
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateOrganizationRequest"
}
}
}
},
"responses": {
"200": {
"description": "Organization created successfully",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateOrganizationResponse"
}
}
}
},
"400": {
"description": "Bad request - missing required parameters",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/OrganizationsErrorResponse"
}
}
}
}
}
}