openapi: 3.0.1 info: title: Ascend API V1 Accounts Organization Account Users API version: v1 description: 'Ascend REST API for insurance financial operations: billing & invoicing, premium financing, payments, installment plans, insureds, programs, loans, payouts, and refunds.' servers: - url: https://sandbox.api.useascend.com description: Test server - url: https://api.useascend.com description: Production server tags: - name: Organization Account Users paths: /v1/organization_accounts/{account_id}/users: post: summary: Create account user tags: - Organization Account Users operationId: createOrgAccountUser security: - bearer_auth: [] parameters: - name: account_id in: path schema: type: string required: true responses: '201': description: created content: application/json: schema: $ref: '#/components/schemas/UserWithArchivedStatus' '400': description: Bad request — user is archived, or email domain does not match an existing admin's domain content: application/json: examples: archived_user: value: errors: - status: 400 title: Bad Request detail: User is archived source: {} email_domain_mismatch: value: errors: - status: 400 title: Bad Request detail: Cannot add a user with email domain 'test.com' since it does not match an existing admin's email domain in this account source: {} requestBody: content: application/json: schema: type: object properties: email: type: string format: email description: The email of the user first_name: type: string description: First name of the user. last_name: type: string description: Last name of the user. phone: type: string description: 'Phone number of the user. Formatted: 5555555555' role: type: string description: User role enum: - producer required: - email - first_name - role get: summary: List account users tags: - Organization Account Users operationId: listOrgAccountUsers security: - bearer_auth: [] parameters: - name: page in: query required: false schema: type: integer description: Page number for paginating results. Default is 1. - name: account_id in: path required: true schema: type: string format: uuid description: The organization account identifier - name: email in: query required: false schema: type: string description: Filter by user email address (case-insensitive) - name: updated_at in: query style: deepObject explode: true description: Only return users that were updated during the given date interval. The date should be defined as an ISO-8601 datetime. required: false schema: type: object properties: lt: type: string format: date-time description: Maximum value to filter by (exclusive). gte: type: string format: date-time description: Minimum value to filter by (inclusive). - name: created_at in: query style: deepObject explode: true description: Only return users that were created during the given date interval. The date should be defined as an ISO-8601 datetime. required: false schema: type: object properties: lt: type: string format: date-time description: Maximum value to filter by (exclusive). gte: type: string format: date-time description: Minimum value to filter by (inclusive). responses: '200': description: successful content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/UserWithArchivedStatus' meta: type: object properties: count: type: integer next: type: string nullable: true prev: type: string nullable: true /v1/organization_accounts/{account_id}/users/{id}: get: summary: Get account user tags: - Organization Account Users operationId: getOrgAccountUser security: - bearer_auth: [] parameters: - name: id in: path schema: type: string required: true - name: account_id in: path schema: type: string required: true responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/UserWithArchivedStatus' components: schemas: UserWithArchivedStatus: type: object properties: id: type: string format: uuid description: The unique identifier for the program email: type: string format: email description: The email for the user first_name: type: string description: First name of the user. last_name: type: string description: Last name of the user. phone: type: string nullable: true description: 'Phone number. Formatted: 5555555555' role: type: string description: User role is_archived: type: boolean description: Is the user archived? securitySchemes: bearer_auth: type: http scheme: bearer