Skip to main content

[METHOD] /endpoint-path

Brief description of what this endpoint does (1-2 sentences).

When to Use This

Explain when and why someone would use this endpoint. Focus on practical use cases:

  • Use Case 1: Specific scenario (e.g., "Sync leads to your dashboard")
  • Use Case 2: Another scenario (e.g., "Generate custom reports")
  • Use Case 3: Third scenario (e.g., "Integrate with external tools")

Authentication

Required: Yes/No

If authentication is required, specify which method:

  • HTTP Basic Auth (client_id:client_secret)
  • Bearer token (JWT)

Request

Endpoint: [METHOD] /endpoint-path

Headers:

Accept: application/json
Content-Type: application/json (for POST/PUT requests)

Example:

curl -u "CLIENT_ID:CLIENT_SECRET" \
-H "Accept: application/json" \
"https://your-api.example.com/endpoint-path?param=value"

Path Parameters

ParameterRequiredTypeDescription
idYesstringUnique identifier for the resource

Query Parameters

ParameterRequiredTypeDescriptionExample
pageNointegerPage number for pagination1
limitNointegerResults per page (max 100)25
filterNostringFilter criteriaactive=true

Request Body (for POST/PUT)

FieldRequiredTypeDescriptionExample
nameYesstringResource name"My Resource"
valueNonumberNumeric value42
activeNobooleanActive statustrue

Example Request Body:

{
"name": "My Resource",
"value": 42,
"active": true
}

Response

Success Response

Status: 200 OK (or 201 Created for POST, 202 Accepted for async)

Response Fields:

FieldTypeDescription
idstringUnique identifier
namestringResource name
created_atstringISO 8601 timestamp
updated_atstringISO 8601 timestamp

Example Response:

{
"id": "abc-123",
"name": "My Resource",
"created_at": "2025-01-15T10:30:00Z",
"updated_at": "2025-01-15T10:30:00Z"
}

Paginated Response (if applicable)

When using page and limit parameters:

{
"data": [
{
"id": "abc-123",
"name": "Resource 1"
},
{
"id": "def-456",
"name": "Resource 2"
}
],
"total": 150,
"page": 1,
"limit": 25
}

Common Errors

Status CodeErrorMeaningSolution
400Bad RequestInvalid request parametersCheck parameter formats and required fields
401UnauthorizedMissing or invalid credentialsVerify your client_id and client_secret
403ForbiddenNo permission to access this resourceCheck OU permissions and user roles
404Not FoundResource doesn't existVerify the ID or path is correct
422Unprocessable EntityValidation failedReview error message for specific field issues
429Too Many RequestsRate limit exceededSlow down requests or contact support for higher limits
500Internal Server ErrorServer-side errorRetry later or contact support if persistent

Example Error Response:

{
"error": "validation_failed",
"message": "Name is required",
"details": {
"field": "name",
"code": "required"
}
}

Important Notes

Organizational Unit (OU) Scoping

This endpoint is OU-scoped. Results are filtered by your active OU:

  • Set active OU via /org-units/active before calling this endpoint
  • Only returns data you have permission to access
  • Multi-OU access requires proper role assignments

Pagination

When using page and limit:

  • Default page: 1
  • Default limit: 25
  • Maximum limit: 100
  • Response includes total, page, and limit metadata

Rate Limiting

  • Standard rate limit: 100 requests per minute
  • Burst allowance: 200 requests
  • Rate limit headers included in response:
    • X-RateLimit-Limit: Maximum requests per minute
    • X-RateLimit-Remaining: Remaining requests
    • X-RateLimit-Reset: Unix timestamp when limit resets

Examples

Example 1: [Specific Use Case]

Describe what this example accomplishes.

curl -u "CLIENT_ID:CLIENT_SECRET" \
-H "Accept: application/json" \
"https://your-api.example.com/endpoint-path?specific=params"

Response:

{
"result": "example"
}

Example 2: [Another Use Case]

Describe another practical example.

curl -u "CLIENT_ID:CLIENT_SECRET" \
-X POST \
-H "Content-Type: application/json" \
-d '{"key": "value"}' \
"https://your-api.example.com/endpoint-path"

Response:

{
"result": "created"
}

Best Practices

  1. [Specific Recommendation]: Explain why this matters
  2. [Another Recommendation]: Practical advice
  3. [Performance Tip]: How to optimize usage

See Also