--- openapi: 3.0.1 info: title: API V1 version: v1 servers: - url: http://localhost:5000 variables: defaultHost: default: localhost:5000 tags: - name: Authentication description: User authentication endpoints paths: "/organizations/{organization_id}/departments": parameters: - name: organization_id in: path description: Organization ID required: true schema: type: integer get: summary: Get all organization departments tags: - Departments responses: '200': description: Loaded successfully content: application/json: schema: type: array items: type: object properties: id: type: integer example: 1 name: type: string example: Engineering description: type: - string - nil example: Developers, UI/UX, QA, and mobile abbreviation: type: - string - nil example: ENG post: summary: Creating a new department tags: - Departments parameters: [] responses: '200': description: Creates the new department successfully content: application/json: schema: type: object properties: id: type: integer example: 1 name: type: string example: Engineering description: type: - string - nil example: Developers, UI/UX, QA, and mobile abbreviation: type: - string - nil example: ENG requestBody: content: application/json: schema: type: object properties: name_en: type: string example: Engineering name_fa: type: string example: مهندسی description_en: type: string example: Engineering team description_fa: type: string example: تیم مهندسی abbreviation: type: string example: ENG "/organizations/{organization_id}/departments/{id}": parameters: - name: organization_id in: path description: Organization ID required: true schema: type: integer - name: id in: path description: Department ID required: true schema: type: integer get: summary: Get the department tags: - Departments responses: '200': description: Loaded successfully content: application/json: schema: type: object properties: id: type: integer example: 1 name: type: string example: Engineering description: type: - string - nil example: Developers, UI/UX, QA, and mobile abbreviation: type: - string - nil example: ENG t: type: object example: name: en: Engineering fa: مهندسی patch: summary: Updates the department tags: - Departments parameters: [] responses: '200': description: Updates the department successfully content: application/json: schema: type: object properties: id: type: integer example: 1 name: type: string example: Engineering description: type: - string - nil example: Developers, UI/UX, QA, and mobile abbreviation: type: - string - nil example: ENG requestBody: content: application/json: schema: type: object properties: name_en: type: string example: Updated Name description_en: type: - string - nil example: Updated description abbreviation: type: - string - nil example: ENG2 delete: summary: Deletes the department tags: - Departments responses: '200': description: Deletes the department successfully "/organizations/{organization_id}/members": parameters: - name: organization_id in: path description: Organization ID required: true schema: type: integer - name: params in: body schema: type: object properties: email: type: string example: john.doe@example.com name_en: type: string example: John Doe name_fa: type: string example: جان ذو color: type: string example: "#ff5512" initial: type: string example: JD invite: type: boolean example: true description: If true, sends an invitation email including an invitation link get: summary: Get all organization members tags: - Members responses: '200': description: Loaded successfully content: application/json: schema: type: array items: type: object properties: id: type: integer example: 1 email: type: string example: john.doe@example.com name: type: string example: John Doe user_id: type: - integer - nil example: 3 organization_id: type: integer example: 1 created_at: type: string example: '2026-02-20 10:52:46.787878000 +0000' updated_at: type: string example: '2026-02-20 10:52:46.787878000 +0000' invited_at: type: - string - nil example: '2026-02-20 10:52:46.787878000 +0000' invitation_key: type: - string - nil example: 0AB1CD2EF3 joined_at: type: - string - nil example: '2026-02-20 10:52:46.787878000 +0000' archived_number: type: - integer - nil example: 1 archived_at: type: - string - nil example: '2026-02-20 10:52:46.787878000 +0000' initial: type: - string - nil example: JD color: type: - string - nil example: "#ff5512" translations: type: object example: name: en: John Doe fa: جان دو post: summary: Creating a new member tags: - Members responses: '200': description: Creates the new member successfully content: application/json: schema: type: object properties: id: type: integer example: 1 email: type: string example: john.doe@example.com name: type: string example: John Doe user_id: type: - integer - nil example: 3 organization_id: type: integer example: 1 created_at: type: string example: '2026-02-20 10:52:46.787878000 +0000' updated_at: type: string example: '2026-02-20 10:52:46.787878000 +0000' invited_at: type: - string - nil example: '2026-02-20 10:52:46.787878000 +0000' invitation_key: type: - string - nil example: 0AB1CD2EF3 joined_at: type: - string - nil example: '2026-02-20 10:52:46.787878000 +0000' archived_number: type: - integer - nil example: 1 archived_at: type: - string - nil example: '2026-02-20 10:52:46.787878000 +0000' initial: type: - string - nil example: JD color: type: - string - nil example: "#ff5512" translations: type: object example: name: en: John Doe fa: جان دو "/organizations/{organization_id}/members/{id}": parameters: - name: organization_id in: path description: Organization ID required: true schema: type: integer - name: id in: path description: Member ID required: true schema: type: integer - name: params in: body schema: type: object properties: email: type: string example: john.doe@example.com name_en: type: string example: Updated Name color: type: string example: "#ff5512" initial: type: string example: JD invite: type: boolean example: true description: If true, sends an invitation email including an invitation link get: summary: Get the members tags: - Members responses: '200': description: Loaded successfully content: application/json: schema: type: object properties: id: type: integer example: 1 email: type: string example: john.doe@example.com name: type: string example: John Doe user_id: type: - integer - nil example: 3 organization_id: type: integer example: 1 created_at: type: string example: '2026-02-20 10:52:46.787878000 +0000' updated_at: type: string example: '2026-02-20 10:52:46.787878000 +0000' invited_at: type: - string - nil example: '2026-02-20 10:52:46.787878000 +0000' invitation_key: type: - string - nil example: 0AB1CD2EF3 joined_at: type: - string - nil example: '2026-02-20 10:52:46.787878000 +0000' archived_number: type: - integer - nil example: 1 archived_at: type: - string - nil example: '2026-02-20 10:52:46.787878000 +0000' initial: type: - string - nil example: JD color: type: - string - nil example: "#ff5512" translations: type: object example: name: en: John Doe fa: جان دو patch: summary: Updates the members tags: - Members responses: '200': description: Updates the member successfully content: application/json: schema: type: object properties: id: type: integer example: 1 email: type: string example: john.doe@example.com name: type: string example: John Doe user_id: type: - integer - nil example: 3 organization_id: type: integer example: 1 created_at: type: string example: '2026-02-20 10:52:46.787878000 +0000' updated_at: type: string example: '2026-02-20 10:52:46.787878000 +0000' invited_at: type: - string - nil example: '2026-02-20 10:52:46.787878000 +0000' invitation_key: type: - string - nil example: 0AB1CD2EF3 joined_at: type: - string - nil example: '2026-02-20 10:52:46.787878000 +0000' archived_number: type: - integer - nil example: 1 archived_at: type: - string - nil example: '2026-02-20 10:52:46.787878000 +0000' initial: type: - string - nil example: JD color: type: - string - nil example: "#ff5512" translations: type: object example: name: en: John Doe fa: جان دو name_en: type: string example: Updated Name "/organizations/{organization_id}/members/{id}/archive": parameters: - name: organization_id in: path description: Organization ID required: true schema: type: integer - name: id in: path description: Member ID required: true schema: type: integer patch: summary: Archives the members tags: - Members responses: '200': description: Archives the member successfully content: application/json: schema: type: object properties: id: type: integer example: 1 email: type: string example: john.doe@example.com name: type: string example: John Doe user_id: type: - integer - nil example: 3 organization_id: type: integer example: 1 created_at: type: string example: '2026-02-20 10:52:46.787878000 +0000' updated_at: type: string example: '2026-02-20 10:52:46.787878000 +0000' invited_at: type: - string - nil example: '2026-02-20 10:52:46.787878000 +0000' invitation_key: type: - string - nil example: 0AB1CD2EF3 joined_at: type: - string - nil example: '2026-02-20 10:52:46.787878000 +0000' archived_number: type: - integer - nil example: 1 archived_at: type: - string - nil example: '2026-02-20 10:52:46.787878000 +0000' initial: type: - string - nil example: JD color: type: - string - nil example: "#ff5512" translations: type: object example: name: en: John Doe fa: جان دو "/organizations/{organization_id}/members/{id}/unarchive": parameters: - name: organization_id in: path description: Organization ID required: true schema: type: integer - name: id in: path description: Member ID required: true schema: type: integer patch: summary: Unarchives the members tags: - Members responses: '200': description: Unarchives the member successfully content: application/json: schema: type: object properties: id: type: integer example: 1 email: type: string example: john.doe@example.com name: type: string example: John Doe user_id: type: - integer - nil example: 3 organization_id: type: integer example: 1 created_at: type: string example: '2026-02-20 10:52:46.787878000 +0000' updated_at: type: string example: '2026-02-20 10:52:46.787878000 +0000' invited_at: type: - string - nil example: '2026-02-20 10:52:46.787878000 +0000' invitation_key: type: - string - nil example: 0AB1CD2EF3 joined_at: type: - string - nil example: '2026-02-20 10:52:46.787878000 +0000' archived_number: type: - integer - nil example: 1 archived_at: type: - string - nil example: '2026-02-20 10:52:46.787878000 +0000' initial: type: - string - nil example: JD color: type: - string - nil example: "#ff5512" translations: type: object example: name: en: John Doe fa: جان دو "/organizations/{organization_id}/members/{id}/set_as_admin": parameters: - name: organization_id in: path description: Organization ID required: true schema: type: integer - name: id in: path description: Member ID required: true schema: type: integer patch: summary: Grants org admin permission to the members tags: - Members responses: '200': description: Grants org admin permission to the member content: application/json: schema: type: object properties: id: type: integer example: 1 email: type: string example: john.doe@example.com name: type: string example: John Doe user_id: type: - integer - nil example: 3 organization_id: type: integer example: 1 created_at: type: string example: '2026-02-20 10:52:46.787878000 +0000' updated_at: type: string example: '2026-02-20 10:52:46.787878000 +0000' invited_at: type: - string - nil example: '2026-02-20 10:52:46.787878000 +0000' invitation_key: type: - string - nil example: 0AB1CD2EF3 joined_at: type: - string - nil example: '2026-02-20 10:52:46.787878000 +0000' archived_number: type: - integer - nil example: 1 archived_at: type: - string - nil example: '2026-02-20 10:52:46.787878000 +0000' initial: type: - string - nil example: JD color: type: - string - nil example: "#ff5512" translations: type: object example: name: en: John Doe fa: جان دو "/organizations/{organization_id}/members/{id}/revoke_admin": parameters: - name: organization_id in: path description: Organization ID required: true schema: type: integer - name: id in: path description: Member ID required: true schema: type: integer patch: summary: Revokes org admin permission from the members tags: - Members responses: '200': description: Revokes org admin permission from the member content: application/json: schema: type: object properties: id: type: integer example: 1 email: type: string example: john.doe@example.com name: type: string example: John Doe user_id: type: - integer - nil example: 3 organization_id: type: integer example: 1 created_at: type: string example: '2026-02-20 10:52:46.787878000 +0000' updated_at: type: string example: '2026-02-20 10:52:46.787878000 +0000' invited_at: type: - string - nil example: '2026-02-20 10:52:46.787878000 +0000' invitation_key: type: - string - nil example: 0AB1CD2EF3 joined_at: type: - string - nil example: '2026-02-20 10:52:46.787878000 +0000' archived_number: type: - integer - nil example: 1 archived_at: type: - string - nil example: '2026-02-20 10:52:46.787878000 +0000' initial: type: - string - nil example: JD color: type: - string - nil example: "#ff5512" translations: type: object example: name: en: John Doe fa: جان دو "/organizations/{organization_id}/members/{id}/send_invitation": parameters: - name: organization_id in: path description: Organization ID required: true schema: type: integer - name: id in: path description: Member ID required: true schema: type: integer post: summary: Sends invitation to the members tags: - Members responses: '200': description: Sends invitation to the members content: application/json: schema: type: object properties: id: type: integer example: 1 email: type: string example: john.doe@example.com name: type: string example: John Doe user_id: type: - integer - nil example: 3 organization_id: type: integer example: 1 created_at: type: string example: '2026-02-20 10:52:46.787878000 +0000' updated_at: type: string example: '2026-02-20 10:52:46.787878000 +0000' invited_at: type: - string - nil example: '2026-02-20 10:52:46.787878000 +0000' invitation_key: type: - string - nil example: 0AB1CD2EF3 joined_at: type: - string - nil example: '2026-02-20 10:52:46.787878000 +0000' archived_number: type: - integer - nil example: 1 archived_at: type: - string - nil example: '2026-02-20 10:52:46.787878000 +0000' initial: type: - string - nil example: JD color: type: - string - nil example: "#ff5512" translations: type: object example: name: en: John Doe fa: جان دو "/organizations": post: summary: Create an organization tags: - Organizations parameters: [] responses: '200': description: Creates a trial organization content: application/json: schema: type: object properties: id: type: integer example: 1 name: type: string example: Sample Organization requestBody: content: application/json: schema: type: object properties: name: type: string example: Sample Organization description: If the name is not presented a random name will be assigned. is_trial: type: boolean example: true required: - is_trial "/users/confirmation": get: summary: Confirm user email tags: - Authentication parameters: - name: confirmation_token in: query description: Email confirmation token example: 6vo7qV45ZqqiaomixcG6 schema: type: string responses: '200': description: Email confirmed successfully content: application/json: schema: type: object properties: id: type: integer example: 1 email: type: string example: john.doe@example.com confirmation_sent_at: type: string example: '2026-02-22T19:18:12.729Z' "/users": post: summary: Sign up as a new user tags: - Authentication parameters: [] responses: '200': description: User created successfully content: application/json: schema: type: object properties: id: type: integer example: 1 email: type: string example: john.doe@example.com first_name: type: string example: John last_name: type: string example: Doe timezone: type: string example: UTC locale: type: string example: en confirmation_sent_at: type: string example: '2026-02-22T19:18:12.729Z' requestBody: content: application/json: schema: type: object properties: email: type: string example: john.doe@example.com first_name: type: string example: John last_name: type: string example: Doe timezone: type: string example: UTC locale: type: string example: en "/users/sign_in": post: summary: Log in with username and password tags: - Authentication parameters: [] responses: '200': description: Logged in successfully content: application/json: schema: type: object properties: id: type: integer example: 1 email: type: string example: john.doe@example.com requestBody: content: application/json: schema: type: object properties: user: type: object properties: email: type: string example: john.doe@example.com password: type: string example: AAAaaa@123 "/users/sign_out": delete: summary: Log out tags: - Authentication parameters: [] responses: '200': description: Logged out successfully content: application/json: schema: type: object properties: message: type: string example: Signed out requestBody: content: application/json: schema: type: object properties: user: type: object properties: email: type: string example: john.doe@example.com