withHuman Invitations API

Invite people to the organization by email.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 4

GET /api/v1/invitations List invitations #
POST /api/v1/invitations Invite a person #
POST /api/v1/invitations/{id}/resend Resend an invitation #
DELETE /api/v1/invitations/{id} Revoke an invitation #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/withhuman-ai:withhuman-ai-invitations-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

withhuman-ai-invitations-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: withHuman provider Invitations API
  version: 1.0.0
  description: Agent Approval Protocol and reviewer product endpoints.
servers:
- url: /
tags:
- name: Invitations
  description: Invite people to the organization by email.
paths:
  /api/v1/invitations:
    get:
      summary: List invitations
      operationId: listInvitations
      x-withhuman-permission: membership.invite
      x-withhuman-credential-kinds:
      - session
      - personal_api_key
      tags:
      - Invitations
      security:
      - cookieAuth: []
      - apiKeyAuth: []
      description: Returns the organization's invitations in every status, newest first.
      parameters:
      - name: limit
        in: query
        description: How many invitations to return. Defaults to 100.
        schema:
          type: integer
          minimum: 1
          maximum: 500
      responses:
        '200':
          description: The invitations
          content:
            application/json:
              schema:
                type: object
                required:
                - invitations
                properties:
                  invitations:
                    type: array
                    items:
                      $ref: '#/components/schemas/Invitation'
        '401':
          $ref: '#/components/responses/Error'
          description: You are not signed in
        '403':
          $ref: '#/components/responses/Error'
          description: You cannot invite people
    post:
      summary: Invite a person
      operationId: createInvitation
      x-withhuman-permission: membership.invite
      x-withhuman-credential-kinds:
      - session
      tags:
      - Invitations
      security:
      - cookieAuth: []
      description: Invite a member with a predefined role, or, where the edition offers custom permissions (`custom_permissions_enabled` in the runtime config), with explicit permission policies. Send exactly one of `role` and `permission_policies`. Only an owner may invite an owner, every permission must be held by the inviter at the selected scope or wider, and a role or policy holding a sensitive permission needs a fresh sign-in.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - email
              properties:
                email:
                  type: string
                  format: email
                  description: Where to send the invitation. The person must accept with this address.
                role:
                  $ref: '#/components/schemas/RoleKey'
                  description: The predefined role the person receives everywhere in the organization.
                permission_policies:
                  type: array
                  minItems: 1
                  items:
                    $ref: '#/components/schemas/PermissionPolicySpec'
                  description: Custom permissions instead of a role. Refused with 403 `custom_permissions_unavailable` where the edition offers predefined roles alone.
              additionalProperties: false
      responses:
        '201':
          description: The invitation and its link. The link appears only in this response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvitationWithURL'
        '400':
          $ref: '#/components/responses/Error'
          description: Neither or both of `role` and `permission_policies` were sent, or the role is unknown
        '403':
          $ref: '#/components/responses/Error'
          description: You cannot invite people, a grant exceeds what you hold or needs a fresher sign-in, or custom permissions are not available in this edition (`custom_permissions_unavailable`)
        '409':
          $ref: '#/components/responses/Error'
          description: A member or a pending invitation with this email already exists, or the organization is at its seat limit
  /api/v1/invitations/{id}/resend:
    post:
      summary: Resend an invitation
      operationId: resendInvitation
      x-withhuman-permission: membership.invite
      x-withhuman-credential-kinds:
      - session
      tags:
      - Invitations
      security:
      - cookieAuth: []
      description: Issues a new link for a pending invitation and extends its expiry by seven days. The previous link stops working. The new link appears only in this response.
      parameters:
      - $ref: '#/components/parameters/InvitationID'
      responses:
        '200':
          description: The invitation and its new link. The link appears only in this response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvitationWithURL'
        '403':
          $ref: '#/components/responses/Error'
          description: You cannot invite people
        '404':
          $ref: '#/components/responses/Error'
          description: No such invitation, or it is no longer pending
  /api/v1/invitations/{id}:
    delete:
      summary: Revoke an invitation
      operationId: revokeInvitation
      x-withhuman-permission: membership.invite
      x-withhuman-credential-kinds:
      - session
      - personal_api_key
      tags:
      - Invitations
      security:
      - cookieAuth: []
      - apiKeyAuth: []
      description: Revokes a pending invitation. Its link stops working. A revoked invitation cannot be resent. Invite the person again instead.
      parameters:
      - $ref: '#/components/parameters/InvitationID'
      responses:
        '204':
          description: The invitation is revoked
        '403':
          $ref: '#/components/responses/Error'
          description: You cannot invite people
        '404':
          $ref: '#/components/responses/Error'
          description: No such invitation, or it is no longer pending
components:
  schemas:
    PermissionPolicySpec:
      type: object
      additionalProperties: false
      required:
      - scope_kind
      - resource_ids
      - permissions
      properties:
        scope_kind:
          type: string
          enum:
          - organization
          - team
          - agent
        resource_ids:
          type: array
          items:
            type: string
          maxItems: 200
          uniqueItems: true
          description: Empty for organization scope; otherwise the selected team IDs or agent slugs.
        permissions:
          type: array
          items:
            type: string
          minItems: 1
          uniqueItems: true
    ForbiddenDetails:
      description: The details on a 403 from a permission check. They name the permission that was needed and the thing it was checked against.
      type: object
      additionalProperties: false
      required:
      - permission
      - resource_kind
      properties:
        permission:
          type: string
          description: The permission you needed.
          example: request.decide
        resource_kind:
          type: string
          enum:
          - organization
          - team
          - agent
          - pipeline
          - request
          description: What kind of thing the check was about.
        resource_id:
          type: string
          description: The team, agent slug, pipeline key, or request the check was about. Absent for the organization.
    ErrorResponse:
      type: object
      additionalProperties: false
      required:
      - error
      properties:
        error:
          type: object
          additionalProperties: false
          required:
          - type
          - code
          - message
          - request_id
          properties:
            type:
              type: string
              enum:
              - invalid_request
              - authentication
              - authorization
              - not_found
              - conflict
              - rate_limit
              - dependency
              - internal
            code:
              type: string
            message:
              type: string
            param:
              type: string
            request_id:
              type: string
            details:
              description: Structured detail for codes that carry one. quota_exceeded carries QuotaExceededDetails; a forbidden error from a permission check carries ForbiddenDetails; a decision the routing rule refused carries RoutingRejectionDetails.
              anyOf:
              - $ref: '#/components/schemas/QuotaExceededDetails'
              - $ref: '#/components/schemas/ForbiddenDetails'
              - $ref: '#/components/schemas/RoutingRejectionDetails'
              - type: object
    Invitation:
      type: object
      description: An invitation to join the organization.
      required:
      - id
      - organization_id
      - email
      - grants
      - invited_by_membership_id
      - status
      - expires_at
      - created_at
      - updated_at
      properties:
        id:
          type: string
          format: uuid
        organization_id:
          type: string
          format: uuid
        email:
          type: string
          example: ada@example.com
          description: The address the invitation was sent to.
        grants:
          type: array
          description: The roles the person receives when they accept.
          items:
            $ref: '#/components/schemas/InvitationGrant'
        invited_by_membership_id:
          type: string
          format: uuid
          description: The member who sent it.
        status:
          type: string
          enum:
          - pending
          - accepted
          - revoked
          - expired
          description: '`pending` can still be accepted. `accepted` and `revoked` are final. `expired` passed its expiry without being accepted.'
        expires_at:
          type: string
          format: date-time
          description: When the link stops working. Seven days from creation or the last resend.
        accepted_membership_id:
          type: string
          format: uuid
          description: The membership created on acceptance. Present for `accepted` only.
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    RoleKey:
      type: string
      enum:
      - owner
      - admin
      - reviewer
      - auditor
      description: A predefined role. `owner` is full control and only an owner may grant it; `admin` manages agents, pipelines, paths, members and teams; `reviewer` decides the requests routed to them; `auditor` reads everything without changing anything.
    InvitationWithURL:
      type: object
      description: An invitation and, on a deployment without email delivery, the link to send. Where email is configured the link goes only to the invitee's mailbox and this field is absent.
      required:
      - invitation
      properties:
        invitation:
          $ref: '#/components/schemas/Invitation'
        invite_url:
          type: string
          format: uri
          description: The link to send to the person. It contains the invitation's secret token, appears only in this response, and only on a deployment with no email delivery configured.
    RoutingRejectionDetails:
      description: The details object on a forbidden error raised by the routing rule at decision time. not_targeted means the request was routed to other people; break_glass_only means the organization sends unrouted requests to holders of request.decide.unrouted; outside_routing_required means the reviewer holds break glass but did not send outside_routing.
      type: object
      additionalProperties: false
      required:
      - reason
      properties:
        reason:
          type: string
          enum:
          - not_targeted
          - break_glass_only
          - outside_routing_required
    QuotaExceededDetails:
      description: The details object on a quota_exceeded error, so a client can offer the purchase that resolves it.
      type: object
      additionalProperties: false
      required:
      - dimension
      - limit
      - used
      properties:
        dimension:
          type: string
          description: The plan dimension that is full, such as seats or agents.
        limit:
          type: integer
          format: int64
          minimum: 0
        used:
          type: integer
          format: int64
          minimum: 0
    InvitationGrant:
      type: object
      description: Permissions granted at one scope, with provenance.
      required:
      - scope_kind
      - permissions
      properties:
        role:
          $ref: '#/components/schemas/RoleKey'
          description: The predefined role the grant makes. Absent for custom permissions.
        role_name:
          type: string
          description: That role's name.
        scope_kind:
          type: string
          enum:
          - organization
          - team
          - agent
          description: Where the role applies.
        scope_id:
          type: string
          description: The team id or the agent slug. Absent for `organization`.
        permissions:
          type: array
          items:
            type: string
  responses:
    Error:
      description: Error response. A 403 from a permission check carries ForbiddenDetails in error.details.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  parameters:
    InvitationID:
      name: id
      in: path
      required: true
      description: The invitation's id.
      schema:
        type: string
        format: uuid
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
    cookieAuth:
      type: apiKey
      in: cookie
      name: withhuman_session
    apiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: whk_ / who_
      description: 'A personal whk_ or organization who_ API key sent as Authorization: Bearer <token>. Personal keys act as their member with live, optionally narrowed access. Organization keys act as themselves with live RBAC permission policies. The x-withhuman-credential-kinds extension lists the kinds supported by each operation. Revocation, expiry, organization status, and the policy switch for that key kind are checked on every request.'