Organizations API
The Organizations API allows you to manage organizations and their API keys.
Create Organization
Creates a new organization with the specified details.
- URL:
/organizations - Method:
POST - Body:
json
{
"name": "My Educational Organization",
"active": true // Optional, default: true
}Response (201 Created)
json
{
"id": "uuid",
"name": "My Educational Organization",
"api_key": "wb_api_key_here",
"created_at": "2025-11-17T10:00:00.000Z"
}Get Organization
Retrieves details of an organization including its API key.
- URL:
/organizations/:id - Method:
GET - Headers:
Authorization:Bearer <jwt-token>
Response
json
{
"id": "uuid",
"name": "Organization Name",
"api_key": "wb_api_key_here",
"created_at": "2025-11-17T10:00:00.000Z",
"updated_at": "2025-11-17T10:00:00.000Z"
}Regenerate API Key
Regenerates the API key for the specified organization.
- URL:
/organizations/:id/regenerate-api-key - Method:
PATCH - Headers:
Authorization:Bearer <jwt-token>
Response
json
{
"id": "uuid",
"name": "Organization Name",
"api_key": "wb_new_api_key_here",
"updated_at": "2025-11-17T10:00:00.000Z"
}