API Reference

Organisations

Read and update the organisation your API key belongs to

Each API key is bound to a single organisation. The endpoints below let you read and update that organisation's profile — name, contact details, address, tax information, and the default messages used on quotes and invoices.

You cannot list organisations through the API. Your key is scoped to one organisation and that scope is set when the key is created in the developer portal.

Endpoints

  • GET/organisations/{orgId} — Get organisation details
  • PUT/organisations/{orgId} — Update organisation

On PUT, send only the fields you want to change — everything is optional and unspecified fields are left untouched. The members map and teamAccessCode are persisted in Firestore but never returned by the API.

GET
/organisations/{orgId}
X-API-Key<token>

API key for authentication. Get your key from the Developer Dashboard.

In: header

Path Parameters

orgId*string

Organisation ID

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://developer.servicebay.io/api/v1/organisations/string"
{
  "success": true,
  "data": {
    "id": "string",
    "name": "string",
    "email": "user@example.com",
    "phone": "string",
    "phoneCountryCode": "string",
    "phoneCountryDialCode": "string",
    "website": "http://example.com",
    "addressLine1": "string",
    "addressLine2": "string",
    "city": "string",
    "state": "string",
    "zip": "string",
    "country": "string",
    "noPhysicalLocation": true,
    "taxId": "string",
    "taxIdLabel": "string",
    "registrationNumber": "string",
    "registrationNumberLabel": "string",
    "defaultInvoiceMessage": "string",
    "defaultInvoicePaymentAdvice": "string",
    "defaultInvoiceTerms": "string",
    "defaultQuoteMessage": "string",
    "defaultQuoteTerms": "string",
    "termsOfServiceDocument": "string",
    "userTermsOfServiceDocument": "string",
    "createdAt": "2019-08-24T14:15:22Z"
  }
}
{
  "success": false,
  "error": "An error occurred"
}
{
  "success": false,
  "error": "An error occurred"
}
{
  "success": false,
  "error": "An error occurred"
}
PUT
/organisations/{orgId}
X-API-Key<token>

API key for authentication. Get your key from the Developer Dashboard.

In: header

Path Parameters

orgId*string

Organisation ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X PUT "https://developer.servicebay.io/api/v1/organisations/string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "success": true,
  "data": {
    "id": "string",
    "name": "string",
    "email": "user@example.com",
    "phone": "string",
    "phoneCountryCode": "string",
    "phoneCountryDialCode": "string",
    "website": "http://example.com",
    "addressLine1": "string",
    "addressLine2": "string",
    "city": "string",
    "state": "string",
    "zip": "string",
    "country": "string",
    "noPhysicalLocation": true,
    "taxId": "string",
    "taxIdLabel": "string",
    "registrationNumber": "string",
    "registrationNumberLabel": "string",
    "defaultInvoiceMessage": "string",
    "defaultInvoicePaymentAdvice": "string",
    "defaultInvoiceTerms": "string",
    "defaultQuoteMessage": "string",
    "defaultQuoteTerms": "string",
    "termsOfServiceDocument": "string",
    "userTermsOfServiceDocument": "string",
    "createdAt": "2019-08-24T14:15:22Z"
  }
}
{
  "success": false,
  "error": "An error occurred"
}
{
  "success": false,
  "error": "An error occurred"
}
{
  "success": false,
  "error": "An error occurred"
}

Machine-readable version: OpenAPI 3.1 spec.

On this page