API Setup

Organization API

API reference for managing organization information

Get Organization

Retrieve information about the authenticated organization.

GET /api/public/v1/organization

Response

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/organization

Request 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.

FieldTypeMandatoryDescription
idstringAuto GeneratedThe ID of the organization
namestringRequiredThe name of the organization
informationstringRequiredThe information of the organization
emailstringRequiredThe email of the organization
phonestringRequiredThe phone of the organization
addressstringRequiredThe address of the organization
citystringRequiredThe city of the organization
statestringRequiredThe state of the organization
zipstringRequiredThe zip of the organization
webHookUrlstringOptionalThe webhook url of the organization
webHookHeadersobjectOptionalThe webhook headers of the organization
whatsappAccessTokenstringRequiredThe whatsapp access token of the organization
whatsappSenderIdstringRequiredThe whatsapp sender id of the organization
    Organization API | OutCaller