Skip to main content
POST
/
organizations
Create Organization
curl --request POST \
  --url https://playground.answeringagent.com/api/v1/organizations \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "name": "Acme Corporation",
  "owner": {
    "external_id": "user_123",
    "email": "[email protected]",
    "name": "John Doe"
  },
  "description": "A technology company specializing in innovative solutions"
}
'
{
  "organization": {
    "id": 1,
    "name": "Acme Corporation",
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-20T14:45:00Z",
    "users": [
      {
        "id": 123,
        "external_id": "<string>",
        "email": "[email protected]",
        "name": "<string>",
        "created_at": "2023-11-07T05:31:56Z",
        "updated_at": "2023-11-07T05:31:56Z",
        "organizations": [
          {
            "id": 123,
            "name": "<string>",
            "role": "owner"
          }
        ]
      }
    ],
    "phone_numbers": [
      {
        "id": 123,
        "name": "<string>",
        "phone_number": "<string>",
        "status": "pending",
        "address": "<string>",
        "google_place_id": "<string>",
        "created_at": "2023-11-07T05:31:56Z",
        "updated_at": "2023-11-07T05:31:56Z"
      }
    ]
  },
  "owner": {
    "id": 123,
    "external_id": "<string>",
    "email": "[email protected]",
    "name": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "organizations": [
      {
        "id": 123,
        "name": "<string>",
        "role": "owner"
      }
    ]
  }
}

Authorizations

X-API-KEY
string
header
required

Body

application/json
name
string
required

Name of the organization

Example:

"Acme Corporation"

owner
object
required

Owner user details

description
string | null

Optional description of the organization

Example:

"A technology company specializing in innovative solutions"

Response

Organization and owner created successfully.

organization
object
owner
object