> ## Documentation Index
> Fetch the complete documentation index at: https://docs.paywise.de/llms.txt
> Use this file to discover all available pages before exploring further.

# Replace and resend a pending setup token

> The memberships of one managed company: list, add, and revoke users.



## OpenAPI

````yaml /api-docs/partner-api/openapi.json post /partner/v2/companies/{company_id}/users/{membership_id}/resend/
openapi: 3.0.3
info:
  description: >-
    Onboard and manage companies and their memberships through the current API
    at the `/partner/v2/` HTTP path.
  title: paywise Partner API
  version: current
servers:
  - description: Production environment
    url: https://api.paywise.de
  - description: Sandbox environment
    url: https://api-sandbox.paywise.de
security: []
tags:
  - description: Client companies managed by the partner.
    name: Companies
  - description: Memberships and invitations of a managed company.
    name: Company users
  - description: Webhook endpoints and their signing secrets.
    name: Webhooks
  - description: Delivery log and redelivery of webhook events.
    name: Webhook deliveries
  - description: Ordered feed of the events webhooks deliver.
    name: Events
  - description: Reference catalog of legal forms.
    name: Legal forms
  - description: The authenticated credential and API availability.
    name: Meta
  - description: Rate-limit headroom of the credential.
    name: Usage
externalDocs:
  url: https://docs.paywise.de/api-docs/partner-api/introduction
paths:
  /partner/v2/companies/{company_id}/users/{membership_id}/resend/:
    post:
      tags:
        - Company users
      summary: Replace and resend a pending setup token
      description: 'The memberships of one managed company: list, add, and revoke users.'
      operationId: replace-and-resend-a-pending-setup-token
      parameters:
        - description: >-
            Required client-supplied key scoped to the Partner owner, method,
            operation and path. An exact retry replays the original response
            while it is retained, including after credential rotation or
            replacement. Current permissions are required.
          in: header
          name: Idempotency-Key
          required: true
          schema:
            type: string
        - description: UUID of the managed company in this request.
          in: path
          name: company_id
          required: true
          schema:
            format: uuid
            type: string
        - description: UUID of the company membership in this request.
          in: path
          name: membership_id
          required: true
          schema:
            format: uuid
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MembershipWithSetupUrl'
          description: ''
          headers:
            Cache-Control:
              description: >-
                Cacheability directive. Authenticated responses use `private,
                no-store`; the legal-form catalog may use `private,
                max-age=86400`.
              schema:
                type: string
            X-Paywise-Environment:
              description: Environment that produced the response.
              schema:
                enum:
                  - production
                  - sandbox
                type: string
            X-Paywise-Request-Id:
              description: >-
                Fresh server-assigned correlation id for this response.
                Caller-provided request ids are ignored.
              schema:
                format: uuid
                type: string
        '400':
          content:
            application/json:
              examples:
                validation-error:
                  value:
                    code: validation_error
                    detail: The request contains invalid data.
                    errors:
                      - code: invalid
                        field: users[0].email
                        message: Enter a valid email address.
              schema:
                $ref: '#/components/schemas/Error'
          description: Standard error response.
          headers:
            Cache-Control:
              description: >-
                Cacheability directive. Authenticated responses use `private,
                no-store`; the legal-form catalog may use `private,
                max-age=86400`.
              schema:
                type: string
            X-Paywise-Environment:
              description: Environment that produced the response.
              schema:
                enum:
                  - production
                  - sandbox
                type: string
            X-Paywise-Request-Id:
              description: >-
                Fresh server-assigned correlation id for this response.
                Caller-provided request ids are ignored.
              schema:
                format: uuid
                type: string
        '401':
          content:
            application/json:
              examples:
                authentication-error:
                  value:
                    code: not_authenticated
                    detail: Authentication credentials were not provided.
              schema:
                $ref: '#/components/schemas/Error'
          description: Standard error response.
          headers:
            Cache-Control:
              description: >-
                Cacheability directive. Authenticated responses use `private,
                no-store`; the legal-form catalog may use `private,
                max-age=86400`.
              schema:
                type: string
            X-Paywise-Environment:
              description: Environment that produced the response.
              schema:
                enum:
                  - production
                  - sandbox
                type: string
            X-Paywise-Request-Id:
              description: >-
                Fresh server-assigned correlation id for this response.
                Caller-provided request ids are ignored.
              schema:
                format: uuid
                type: string
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Standard error response.
          headers:
            Cache-Control:
              description: >-
                Cacheability directive. Authenticated responses use `private,
                no-store`; the legal-form catalog may use `private,
                max-age=86400`.
              schema:
                type: string
            X-Paywise-Environment:
              description: Environment that produced the response.
              schema:
                enum:
                  - production
                  - sandbox
                type: string
            X-Paywise-Request-Id:
              description: >-
                Fresh server-assigned correlation id for this response.
                Caller-provided request ids are ignored.
              schema:
                format: uuid
                type: string
        '404':
          content:
            application/json:
              examples:
                not-found-error:
                  value:
                    code: not_found
                    detail: The requested resource was not found.
              schema:
                $ref: '#/components/schemas/Error'
          description: Standard error response.
          headers:
            Cache-Control:
              description: >-
                Cacheability directive. Authenticated responses use `private,
                no-store`; the legal-form catalog may use `private,
                max-age=86400`.
              schema:
                type: string
            X-Paywise-Environment:
              description: Environment that produced the response.
              schema:
                enum:
                  - production
                  - sandbox
                type: string
            X-Paywise-Request-Id:
              description: >-
                Fresh server-assigned correlation id for this response.
                Caller-provided request ids are ignored.
              schema:
                format: uuid
                type: string
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: ''
          headers:
            Cache-Control:
              description: >-
                Cacheability directive. Authenticated responses use `private,
                no-store`; the legal-form catalog may use `private,
                max-age=86400`.
              schema:
                type: string
            X-Paywise-Environment:
              description: Environment that produced the response.
              schema:
                enum:
                  - production
                  - sandbox
                type: string
            X-Paywise-Request-Id:
              description: >-
                Fresh server-assigned correlation id for this response.
                Caller-provided request ids are ignored.
              schema:
                format: uuid
                type: string
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Standard error response.
          headers:
            Cache-Control:
              description: >-
                Cacheability directive. Authenticated responses use `private,
                no-store`; the legal-form catalog may use `private,
                max-age=86400`.
              schema:
                type: string
            Retry-After:
              description: Integer seconds to wait before retrying a throttled request.
              schema:
                minimum: 1
                type: integer
            X-Paywise-Environment:
              description: Environment that produced the response.
              schema:
                enum:
                  - production
                  - sandbox
                type: string
            X-Paywise-Request-Id:
              description: >-
                Fresh server-assigned correlation id for this response.
                Caller-provided request ids are ignored.
              schema:
                format: uuid
                type: string
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Standard error response.
          headers:
            Cache-Control:
              description: >-
                Cacheability directive. Authenticated responses use `private,
                no-store`; the legal-form catalog may use `private,
                max-age=86400`.
              schema:
                type: string
            X-Paywise-Environment:
              description: Environment that produced the response.
              schema:
                enum:
                  - production
                  - sandbox
                type: string
            X-Paywise-Request-Id:
              description: >-
                Fresh server-assigned correlation id for this response.
                Caller-provided request ids are ignored.
              schema:
                format: uuid
                type: string
      security:
        - partnerBearerAuth: []
components:
  schemas:
    MembershipWithSetupUrl:
      description: |-
        Create/resend response: the membership plus its one-time `setup_url`.

        Same rule as the webhook signing secret: the link is the invite token,
        shown exactly once on the response of the command that issued it. Reads
        use `MembershipSerializer` (no such field) and the view redacts the
        field from the idempotency snapshot, so replays omit it as well.
      properties:
        created_at:
          description: Time at which the membership was created.
          format: date-time
          readOnly: true
          type: string
        email:
          description: >-
            Email address submitted with the invitation while it is unaccepted;
            after acceptance, reflects the user's current profile.
          format: email
          maxLength: 128
          type: string
        first_name:
          description: >-
            Given name submitted with the invitation while it is unaccepted;
            after acceptance, reflects the user's current profile.
          maxLength: 128
          type: string
        id:
          description: >-
            Stable identifier of this user's membership in the managed company.
            Use it as membership_id in the company users endpoints.
          format: uuid
          readOnly: true
          type: string
        invite_expires_at:
          description: >-
            Expiry time of the setup invitation while the membership is
            pending_setup; null when no pending setup invitation is attached.
          format: date-time
          nullable: true
          readOnly: true
          type: string
        last_name:
          description: >-
            Family name submitted with the invitation while it is unaccepted;
            after acceptance, reflects the user's current profile.
          maxLength: 128
          type: string
        revocation_reason:
          description: Reason recorded when the membership was revoked.
          readOnly: true
          type: string
        revoked_at:
          description: Time at which the membership was revoked.
          format: date-time
          nullable: true
          readOnly: true
          type: string
        revoked_by_token_id:
          description: Partner credential that revoked the membership, when applicable.
          format: uuid
          nullable: true
          readOnly: true
          type: string
        role:
          allOf:
            - $ref: '#/components/schemas/RoleEnum'
          description: |-
            Permissions the user receives within the managed company.

            * `admin` - admin
            * `tax_consultant` - tax_consultant
            * `member` - member
            * `readonly` - readonly
            * `developer` - developer
        sandbox_origin:
          allOf:
            - $ref: '#/components/schemas/SandboxOriginEnum'
          description: >-
            Provenance of the user behind this membership — `sandbox_native` for
            a subject created inside the sandbox (a test resource),
            `production_mirror` for a read-only copy of a production user,
            `unclassified` otherwise (always so in production).


            * `production_mirror` - Production mirror

            * `sandbox_native` - Sandbox native

            * `unclassified` - Unclassified
          readOnly: true
        setup_url:
          description: >-
            One-time setup invitation link. Returned on a fresh membership
            invitation or resend; omitted from idempotent replays. Treat the
            link as a secret.
          format: uri
          nullable: true
          readOnly: true
          type: string
        status:
          allOf:
            - $ref: '#/components/schemas/StatusEnum'
          description: >-
            Membership lifecycle state: pending_setup awaits invitation
            acceptance; active grants access; cancelled ends a pending
            invitation; revoked removes an active membership's access.
          readOnly: true
        updated_at:
          description: Time at which the membership was last updated.
          format: date-time
          readOnly: true
          type: string
      required:
        - created_at
        - email
        - first_name
        - id
        - invite_expires_at
        - last_name
        - revocation_reason
        - revoked_at
        - revoked_by_token_id
        - role
        - sandbox_origin
        - status
        - updated_at
      type: object
    Error:
      properties:
        code:
          description: Machine-readable error category.
          type: string
        detail:
          description: Short human-readable summary of the error.
          type: string
        errors:
          description: Field-level validation errors, when applicable.
          items:
            $ref: '#/components/schemas/ErrorItem'
          type: array
      required:
        - detail
        - code
      type: object
    RoleEnum:
      description: |-
        * `admin` - admin
        * `tax_consultant` - tax_consultant
        * `member` - member
        * `readonly` - readonly
        * `developer` - developer
      enum:
        - admin
        - tax_consultant
        - member
        - readonly
        - developer
      type: string
    SandboxOriginEnum:
      description: |-
        * `production_mirror` - Production mirror
        * `sandbox_native` - Sandbox native
        * `unclassified` - Unclassified
      enum:
        - production_mirror
        - sandbox_native
        - unclassified
      type: string
    StatusEnum:
      enum:
        - pending_setup
        - active
        - cancelled
        - revoked
      type: string
    ErrorItem:
      properties:
        code:
          description: Machine-readable field error code.
          type: string
        field:
          description: >-
            Path to the field that caused the error, using dots for objects and
            brackets for list indexes, for example `claims[0].amount`; null for
            an error without a field path.
          nullable: true
          type: string
        message:
          description: Human-readable explanation of the field error.
          type: string
      required:
        - field
        - code
        - message
      type: object
  securitySchemes:
    partnerBearerAuth:
      description: >-
        Partner API Bearer key: `Authorization: Bearer <key>`. Keys are created
        only through authorized portal or staff flows.
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.