Rapidata Organization API

The Organization API from Rapidata — 8 operation(s) for organization.

OpenAPI Specification

rapidata-organization-api-openapi.yml Raw ↑
openapi: 3.0.4
info:
  title: Rapidata Asset Organization API
  description: The API for the Rapidata Asset service
  version: v1
servers:
- url: https://api.rapidata.ai/
tags:
- name: Organization
  x-displayName: Organization
paths:
  /organizations/accept-invitation:
    post:
      tags:
      - Organization
      summary: Accepts the invitation identified by the token.
      description: "Responds with 409 when the invitation is expired, already used, or was issued to a different\n email than the calling customer's."
      requestBody:
        description: The invitation token.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AcceptOrgInvitationEndpoint_Input'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AcceptOrgInvitationEndpoint_Output'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /organizations:
    post:
      tags:
      - Organization
      summary: Creates an organization and makes the calling customer its owner.
      description: "The calling customer becomes both the owner and the billing customer. Responds with 400 when\n the slug is already taken."
      requestBody:
        description: The organization to create.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOrganizationEndpoint_Input'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateOrganizationEndpoint_Output'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
    get:
      tags:
      - Organization
      summary: Returns a paged list of organizations.
      parameters:
      - name: page
        in: query
        description: The 1-based page index.
        schema:
          type: integer
        x-parameter-group: page
      - name: page_size
        in: query
        description: The number of items per page.
        schema:
          type: integer
        x-parameter-group: page
      - name: sort
        in: query
        description: Sort fields. Prefix with - for descending order (e.g. -created_at).
        schema:
          type: array
          items:
            enum:
            - name
            - -name
            - domain
            - -domain
            type: string
        x-parameter-group: sort
      - name: name
        in: query
        description: Filter by name.
        style: deepObject
        explode: true
        schema:
          type: object
          properties:
            eq:
              type: string
            neq:
              type: string
            gt:
              type: string
            gte:
              type: string
            lt:
              type: string
            lte:
              type: string
            contains:
              type: string
            starts_with:
              type: string
            ends_with:
              type: string
            in:
              type: array
              items:
                type: string
            not_contains:
              type: string
        x-parameter-group: filters
      - name: domain
        in: query
        description: Filter by domain.
        style: deepObject
        explode: true
        schema:
          type: object
          properties:
            eq:
              type: string
            neq:
              type: string
            gt:
              type: string
            gte:
              type: string
            lt:
              type: string
            lte:
              type: string
            contains:
              type: string
            starts_with:
              type: string
            ends_with:
              type: string
            in:
              type: array
              items:
                type: string
            not_contains:
              type: string
        x-parameter-group: filters
      - name: owner
        in: query
        description: Filter by owner.
        style: deepObject
        explode: true
        schema:
          type: object
          properties:
            eq:
              type: string
            neq:
              type: string
            gt:
              type: string
            gte:
              type: string
            lt:
              type: string
            lte:
              type: string
            contains:
              type: string
            starts_with:
              type: string
            ends_with:
              type: string
            in:
              type: array
              items:
                type: string
            not_contains:
              type: string
        x-parameter-group: filters
      - name: logic
        in: query
        description: 'How to combine the field filters: "and" (default) requires every filter to match, "or" requires any of them to match.'
        schema:
          enum:
          - and
          - or
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryOrganizationsEndpoint_PagedResultOfOutput'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /organizations/mine:
    get:
      tags:
      - Organization
      summary: Returns the organization resolved from the calling customer's email domain.
      description: Responds with 404 when the caller's email domain does not match a registered organization.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetMyOrganizationEndpoint_Output'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /organizations/{organizationId}:
    get:
      tags:
      - Organization
      summary: Returns the organization with the given id.
      parameters:
      - name: organizationId
        in: path
        description: The id of the organization to retrieve.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetOrganizationEndpoint_Output'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /organizations/{organizationId}/invitations:
    post:
      tags:
      - Organization
      summary: Creates an invitation to join the organization.
      description: Returns a single-use token the invitee presents to the accept-invitation endpoint.
      parameters:
      - name: organizationId
        in: path
        description: The id of the organization to invite into.
        required: true
        schema:
          type: string
      requestBody:
        description: The invitee email and role.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InviteOrgMemberEndpoint_Input'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InviteOrgMemberEndpoint_Output'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /organizations/{organizationId}/members:
    get:
      tags:
      - Organization
      summary: Returns the members of the given organization.
      parameters:
      - name: organizationId
        in: path
        description: The id of the organization whose members to list.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListOrgMembersEndpoint_Output'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /organizations/{organizationId}/members/{customerId}:
    delete:
      tags:
      - Organization
      summary: Removes the given customer's membership from the organization.
      description: "Responds with 404 when the customer is not a member and 409 when removing the organization's\n last owner."
      parameters:
      - name: organizationId
        in: path
        description: The id of the organization.
        required: true
        schema:
          type: string
      - name: customerId
        in: path
        description: The id of the customer to remove.
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /organizations/{owner}/support-slack-channel:
    put:
      tags:
      - Organization
      summary: Sets the support Slack channel URL for the organization owned by the given customer.
      description: A null or empty URL clears the channel. Responds with 404 when no organization is owned by the given customer.
      parameters:
      - name: owner
        in: path
        description: The customer ID that owns the organization.
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: The support Slack channel URL to set or clear.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetOrganizationSupportSlackChannelEndpoint_Input'
        required: true
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
components:
  schemas:
    InviteOrgMemberEndpoint_Input:
      required:
      - email
      - role
      type: object
      properties:
        email:
          type: string
          description: The email address to invite.
        role:
          allOf:
          - $ref: '#/components/schemas/OrgRole'
          description: The org-scoped role the resulting membership will confer.
    CreateOrganizationEndpoint_Output:
      required:
      - organizationId
      type: object
      properties:
        organizationId:
          type: string
          description: The id of the created organization.
    OrgRole:
      enum:
      - Owner
      - Admin
      - Editor
      - Viewer
    MembershipStatus:
      enum:
      - Active
      - Suspended
    InviteOrgMemberEndpoint_Output:
      required:
      - invitationId
      - token
      - expiresAt
      type: object
      properties:
        invitationId:
          type: string
          description: The id of the created invitation.
        token:
          type: string
          description: The single-use token used to accept the invitation.
        expiresAt:
          type: string
          description: The instant after which the invitation can no longer be accepted.
          format: date-time
    AcceptOrgInvitationEndpoint_Output:
      required:
      - organizationId
      - membershipId
      type: object
      properties:
        organizationId:
          type: string
          description: The organization the customer joined.
        membershipId:
          type: string
          description: The id of the created membership.
    ValidationProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
    QueryOrganizationsEndpoint_PagedResultOfOutput:
      required:
      - total
      - page
      - pageSize
      - items
      type: object
      properties:
        total:
          type: integer
          format: int64
        page:
          type: integer
          format: int32
        pageSize:
          type: integer
          format: int32
        items:
          type: array
          items:
            $ref: '#/components/schemas/QueryOrganizationsEndpoint_Output'
        totalPages:
          type: integer
          format: int32
    SetOrganizationSupportSlackChannelEndpoint_Input:
      type: object
      properties:
        url:
          type: string
          description: The support Slack channel URL to set, or null/empty to clear it.
          nullable: true
    CreateOrganizationEndpoint_Input:
      required:
      - name
      - slug
      type: object
      properties:
        name:
          type: string
          description: The human-readable name of the organization.
        slug:
          type: string
          description: A URL-safe unique identifier for the organization.
        primaryDomain:
          type: string
          description: The primary email domain associated with the organization, if any.
          nullable: true
    AcceptOrgInvitationEndpoint_Input:
      required:
      - token
      type: object
      properties:
        token:
          type: string
          description: The single-use invitation token.
    QueryOrganizationsEndpoint_Output:
      required:
      - owner
      - name
      - domain
      type: object
      properties:
        owner:
          type: string
          description: The customer ID of the organization owner.
          format: uuid
        name:
          type: string
          description: The name of the organization.
        domain:
          type: string
          description: The domain associated with this organization.
    GetMyOrganizationEndpoint_Output:
      required:
      - name
      - supportSlackChannelUrl
      type: object
      properties:
        name:
          type: string
          description: The name of the organization.
        supportSlackChannelUrl:
          type: string
          description: The support Slack channel URL of the organization, if one has been configured.
          nullable: true
    ListOrgMembersEndpoint_Output_Member:
      required:
      - customerId
      - email
      - role
      - status
      type: object
      properties:
        customerId:
          type: string
          format: uuid
        email:
          type: string
          nullable: true
        role:
          $ref: '#/components/schemas/OrgRole'
        status:
          $ref: '#/components/schemas/MembershipStatus'
    GetOrganizationEndpoint_Output:
      required:
      - id
      - name
      - slug
      - billingCustomerId
      - primaryDomain
      type: object
      properties:
        id:
          type: string
          description: The id of the organization.
        name:
          type: string
          description: The human-readable name of the organization.
        slug:
          type: string
          description: The URL-safe unique identifier of the organization.
        billingCustomerId:
          type: string
          description: The customer that owns billing for the organization.
          format: uuid
        primaryDomain:
          type: string
          description: The primary email domain associated with the organization, if any.
          nullable: true
    ListOrgMembersEndpoint_Output:
      required:
      - members
      type: object
      properties:
        members:
          allOf:
          - type: array
            items:
              $ref: '#/components/schemas/ListOrgMembersEndpoint_Output_Member'
          description: The members of the organization.
  securitySchemes:
    OpenIdConnect:
      type: openIdConnect
      description: OpenID Connect connection flow
      openIdConnectUrl: https://auth.rapidata.ai/.well-known/openid-configuration
x-tagGroups:
- name: Rapidata Asset API
  tags:
  - Asset
  - BatchUpload
- name: Rapidata Audience API
  tags:
  - Audience
  - Examples
- name: Rapidata Campaign API
  tags:
  - Cache
  - Campaign
  - ExternalAudience
- name: Rapidata Dataset API
  tags:
  - ContextShortening
  - Datapoints
  - Dataset
  - DatasetGroup
- name: Rapidata Flow API
  tags:
  - Flow
  - FlowItem
  - RankingFlow
  - RankingFlowItem
- name: Rapidata Identity API
  tags:
  - Rapidata.Identity.API
  - Client
  - Customer
  - Identity
  - Newsletter
  - Organization
  - Survey
- name: Rapidata Leaderboard API
  tags:
  - Benchmark
  - SampleGeneration
  - Faucet
  - Replicate
  - Leaderboard
  - Participant
  - Prompt
  - Sample
- name: Rapidata Order API
  tags:
  - Feedback
  - Job
  - Order
- name: Rapidata Payment API
  tags:
  - Billing
  - ExternalServicePrices
  - Reconciliation
  - Settings
  - VolumeDiscount
  - BillingAccount
  - Invoice
  - Payment
- name: Rapidata Pipeline API
  tags:
  - Pipeline
- name: Rapidata Rapid API
  tags:
  - CustomerRapid
  - GlobalText
  - Rapid
  - UserRapid
  - ValidationFeedback
- name: Rapidata Signal API
  tags:
  - Signal
- name: Rapidata Translation API
  tags:
  - Translation
- name: Rapidata Validation API
  tags:
  - ValidationSet
- name: Rapidata Workflow API
  tags:
  - Evaluation
  - GroupedRanking
  - Ranking
  - SimpleWorkflow
  - Workflow