RecoupGet a Free AuditFree Audit

API REFERENCE

Create Organization

On this page
POST/api/organizations

Create 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

namestringrequired

The name of the organization to create

accountIdstringrequired

The account ID of the creator

format: uuid

Responses

200Organization created successfully

application/json

statusstring · enumrequired

Status of the request

Values: "success"

organizationobjectrequired

The created organization

Properties for organization
idstring

UUID of the new organization account

format: uuid

namestring

Name of the organization

400Bad request - missing required parameters

application/json

statusstring · enumrequired

Status of the request

Values: "error"

messagestringrequired

Error message describing what went wrong

Full specification

Download the OpenAPI file for complete schemas, constraints, and examples.

Download accounts.json
View 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"
          }
        }
      }
    }
  }
}