API Setup
Organization API
API reference for managing organization information
Get Organization
Retrieve information about the authenticated organization.
GET /api/public/v1/organizationResponse
The response is the organization details, when you fetch the organization.
{
"id": "your_org_id",
"name": "your_org_name",
"information": "your_org_information",
"email": "your_org_email",
"phone": "your_org_phone",
"address": "your_org_address",
"city": "your_org_city",
"state": "your_org_state",
"zip": "your_org_zip",
"webHookUrl": "your_org_webhook_url",
"webHookHeaders": {
"X-API-KEY": "your_org_api_key"
},
"whatsappAccessToken": "your_org_whatsapp_access_token",
"whatsappSenderId": "your_org_whatsapp_sender_id",
"createdAt": "your_org_created_at",
"updatedAt": "your_org_updated_at"
}Update Organization
Update information about the authenticated organization.
PUT /api/public/v1/organizationRequest Body
The request body should contain the fields you want to update.
{
"name": "updated_org_name",
"information": "updated_org_information",
"email": "updated_org_email",
"phone": "updated_org_phone",
"address": "updated_org_address",
"city": "updated_org_city",
"state": "updated_org_state",
"zip": "updated_org_zip"
}Response
The response contains the success status and the updated organization details.
{
"success": true,
"organization": {
"id": "your_org_id",
"name": "your_updated_org_name",
"information": "your_updated_org_information",
"email": "your_updated_org_email",
"phone": "your_updated_org_phone",
"address": "your_updated_org_address",
"city": "your_updated_org_city",
"state": "your_updated_org_state",
"country": "your_updated_org_country",
"zip": "your_updated_org_zip",
"webHookUrl": "your_updated_org_webhook_url",
"webHookHeaders": {
"X-API-KEY": "your_updated_org_api_key"
},
"whatsappAccessToken": "your_updated_org_whatsapp_access_token",
"whatsappSenderId": "your_updated_org_whatsapp_sender_id",
"hideUsage": false,
"updatedAt": "your_org_updated_at"
}
}Organization Schema
The organization schema is the schema of the organization.
| Field | Type | Mandatory | Description |
|---|---|---|---|
| id | string | Auto Generated | The ID of the organization |
| name | string | Required | The name of the organization |
| information | string | Required | The information of the organization |
| string | Required | The email of the organization | |
| phone | string | Required | The phone of the organization |
| address | string | Required | The address of the organization |
| city | string | Required | The city of the organization |
| state | string | Required | The state of the organization |
| zip | string | Required | The zip of the organization |
| webHookUrl | string | Optional | The webhook url of the organization |
| webHookHeaders | object | Optional | The webhook headers of the organization |
| whatsappAccessToken | string | Required | The whatsapp access token of the organization |
| whatsappSenderId | string | Required | The whatsapp sender id of the organization |