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

# Create an agreement in `requested`

> Creates an agreement in `requested` — the provider's installation picks it up and drives it. The caller names the partnership, the registered template and the signers; the template's provider_key and installation are copied onto the record.



## OpenAPI

````yaml /openapi.json post /agreements/
openapi: 3.1.0
info:
  title: Journeybee API
  description: >-
    Public REST API for the Journeybee PRM platform.


    Manage partners, leads, deals, products, pricing calculators, tasks, and
    more programmatically.


    All endpoints require authentication via API key. Use `Authorization: Bearer
    <api_key>` or `Api-Key <api_key>` header.


    See the [Authentication guide](/guides/authentication) for details.
  version: 1.0.0
servers:
  - url: https://api.journeybee.io/v1
    description: Production
security:
  - apiKey: []
tags:
  - name: Account
    description: >-
      Authenticated company account info, API key permissions, and enabled
      modules
  - name: Agreement Templates
  - name: Agreements
  - name: Analytics
    description: >-
      Dashboard analytics and reporting — commission, engagement, LMS, and
      partner revenue metrics
  - name: Assets
    description: File and media asset management
  - name: Attributions
    description: Attribution type definitions
  - name: Audit Log
    description: Unified audit log of company activity (read-only)
  - name: Automations
    description: Workflow automation rule configurations
  - name: Campaign Audience
    description: Audience filters on a campaign
  - name: Campaign Partners
    description: Partners shared into a campaign audience
  - name: Campaigns
    description: Partner marketing campaigns
  - name: Card Assignees
    description: Assigned users on a card
  - name: Card Partners
    description: Partners linked to a card
  - name: Card Tags
    description: Tags on a card
  - name: Cards
    description: Kanban project cards
  - name: Categories
    description: Partner categories
  - name: Certification Categories
    description: Categories on a certification
  - name: Certification Enrollments
    description: User enrollments in a certification
  - name: Certification Folders
    description: Folders on a certification
  - name: Certification Resources
    description: Curriculum resources in a certification
  - name: Certifications
    description: LMS certifications
  - name: Commissions
    description: >-
      Commission rule configurations with calculation entries,
      tier/category/partnership scoping
  - name: Contacts
    description: Partner contacts across partnerships
  - name: Currencies
    description: Available currencies
  - name: Custom Field Options
    description: Options on select/multi-select custom fields
  - name: Custom Field Rules
    description: Visibility and requirement rules on custom fields
  - name: Custom Field Values
    description: Custom field values
  - name: Custom Fields
    description: Custom field definitions
  - name: Deal Commission
    description: Commission calculation on a deal
  - name: Deal Custom Field Values
    description: Custom field values on a deal
  - name: Deal Notes
    description: Notes on a deal
  - name: Deal Payments
    description: Payment records on a deal (read-only)
  - name: Deal Products
    description: Products attached to a deal
  - name: Deal Stages
    description: Deal pipeline stages
  - name: Deal Tags
    description: Tags on a deal
  - name: Deal Tasks
    description: Tasks on a deal
  - name: Deals
    description: Deal management
  - name: Event Subscriptions
  - name: Event Types
  - name: Folders
    description: Content folders
  - name: Integrations
    description: Company integration settings
  - name: Lead Attributions
    description: Attribution records on a lead
  - name: Lead Contacts
    description: Partner contacts on a lead
  - name: Lead Custom Field Values
    description: Custom field values on a lead
  - name: Lead Distributor
    description: Distributors for a lead
  - name: Lead Notes
    description: Notes on a lead
  - name: Lead Products
    description: Products attached to a lead
  - name: Lead Quotes
    description: >-
      Quotes on a lead — generated from pricing calculators with line items and
      totals
  - name: Lead Tags
    description: Tags on a lead
  - name: Lead Tasks
    description: Tasks on a lead
  - name: Lead Users
    description: Assigned users on a lead
  - name: Leads
    description: Lead management
  - name: Marketing Templates
    description: Marketing email templates
  - name: Partner Contacts
    description: Contacts on a partner
  - name: Partner Custom Field Values
    description: Custom field values on a partner
  - name: Partner Domains
    description: Domains on a partner
  - name: Partner Notes
    description: Notes on a partner
  - name: Partner Resellers
    description: Reseller assignments on a distributor
  - name: Partner Stages
    description: Partner pipeline stages
  - name: Partner Tags
    description: Tags on a partner
  - name: Partner Users
    description: Assigned users on a partner
  - name: Partners
    description: Core partner CRUD
  - name: Pricing Calculator Fields
    description: Input fields on a pricing calculator
  - name: Pricing Calculator Formulas
    description: Discount/tax/surcharge formulas on a pricing calculator
  - name: Pricing Calculator Products
    description: Products attached to a pricing calculator
  - name: Pricing Calculators
    description: Pricing calculator configurations
  - name: Products
    description: Product catalog
  - name: Resource Blocks
    description: Content blocks within a resource
  - name: Resource Categories
    description: Categories on a resource
  - name: Resource Folders
    description: Folders on a resource
  - name: Resource Tags
    description: Tags on a resource
  - name: Resources
    description: Learning resources
  - name: Room Blocks
    description: Content blocks within a room
  - name: Room Categories
    description: Category-based room access control
  - name: Room Partnerships
    description: Direct partnership room access
  - name: Room Secure Files
    description: >-
      Private files in a secure_files room block: folders, multipart uploads,
      signed download links and download history
  - name: Room Stages
    description: Stage-based room access control
  - name: Room Tags
    description: Tag-based room access control
  - name: Room Tiers
    description: Tier-based room access control
  - name: Rooms
    description: Partner portal rooms
  - name: Tags
    description: Tag definitions
  - name: Task Users
    description: Assigned users on a task
  - name: Tasks
    description: Task management
  - name: Tiers
    description: Partner tiers
  - name: Users
    description: Company team members
  - name: Webhook Events
    description: Outbound webhook payloads sent to your configured URLs when events occur
paths:
  /agreements/:
    post:
      tags:
        - Agreements
      summary: Create an agreement in `requested`
      description: >-
        Creates an agreement in `requested` — the provider's installation picks
        it up and drives it. The caller names the partnership, the registered
        template and the signers; the template's provider_key and installation
        are copied onto the record.
      operationId: createAgreement
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                partnership_uuid:
                  type: string
                  format: uuid
                  pattern: >-
                    ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                  description: >-
                    The partnership the agreement belongs to. Archived or
                    foreign partnerships are a 404.
                template_uuid:
                  type: string
                  format: uuid
                  pattern: >-
                    ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                  description: >-
                    The registered provider template (must be active and owned
                    by this company). Its provider_key and installation_uuid are
                    copied onto the agreement.
                name:
                  type: string
                  minLength: 1
                  maxLength: 500
                signers:
                  minItems: 1
                  maxItems: 25
                  type: array
                  items:
                    type: object
                    properties:
                      role_name:
                        type: string
                        minLength: 1
                        maxLength: 64
                        description: Template role name this signer fills.
                      routing_order:
                        default: 1
                        description: Signing order; 1 signs first.
                        type: integer
                        minimum: 1
                        maximum: 32767
                      contact_uuid:
                        type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                      user_uuid:
                        type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                      email:
                        type: string
                        maxLength: 320
                        format: email
                        pattern: >-
                          ^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
                      name:
                        type: string
                        minLength: 1
                        maxLength: 255
                    required:
                      - role_name
                      - routing_order
                    additionalProperties: false
              required:
                - partnership_uuid
                - template_uuid
                - name
                - signers
              additionalProperties: false
      responses:
        '201':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  uuid:
                    type: string
                  partnership_uuid:
                    type: string
                    description: >-
                      The partnership this agreement belongs to. The subject of
                      every v1 agreement.
                  agreement_template_uuid:
                    description: >-
                      The provider template this agreement was created from, or
                      null once the template is deleted.
                    anyOf:
                      - type: string
                      - type: 'null'
                  name:
                    type: string
                    description: Document name shown to signers.
                  status:
                    type: string
                    enum:
                      - requested
                      - sent
                      - viewed
                      - signed
                      - declined
                      - voided
                      - expired
                      - failed
                    description: >-
                      `requested` after create; the provider's installation
                      moves it through `sent`/`viewed` to `signed`, or to a
                      terminal `declined`, `voided`, `expired` or `failed`.
                      Never settable by a person.
                  provider_key:
                    type: string
                    description: >-
                      The provider app's name (installations.app_id ->
                      apps.name), stamped by the server — identifies which
                      provider owns this agreement.
                  external_ref:
                    description: >-
                      The provider's object id for this agreement (e.g. the
                      envelope id), set by the installation on send.
                    anyOf:
                      - type: string
                      - type: 'null'
                  failure_reason:
                    description: The provider's own error text when status is `failed`.
                    anyOf:
                      - type: string
                      - type: 'null'
                  requested_by_user_uuid:
                    description: >-
                      User who created the agreement, when the creating
                      credential identifies one.
                    anyOf:
                      - type: string
                      - type: 'null'
                  signed_asset_uuid:
                    description: >-
                      Asset holding the signed document, once uploaded
                      (JOU-961).
                    anyOf:
                      - type: string
                      - type: 'null'
                  certificate_asset_uuid:
                    description: >-
                      Asset holding the completion certificate, once uploaded
                      (JOU-961).
                    anyOf:
                      - type: string
                      - type: 'null'
                  sent_at:
                    anyOf:
                      - type: string
                      - type: 'null'
                  viewed_at:
                    anyOf:
                      - type: string
                      - type: 'null'
                  completed_at:
                    anyOf:
                      - type: string
                      - type: 'null'
                  declined_at:
                    anyOf:
                      - type: string
                      - type: 'null'
                  voided_at:
                    anyOf:
                      - type: string
                      - type: 'null'
                  expired_at:
                    anyOf:
                      - type: string
                      - type: 'null'
                  failed_at:
                    anyOf:
                      - type: string
                      - type: 'null'
                  expires_at:
                    description: Provider-reported signing deadline.
                    anyOf:
                      - type: string
                      - type: 'null'
                  void_requested_at:
                    description: >-
                      Set when a person requested a void; the provider's
                      installation carries it out and then patches status to
                      `voided`.
                    anyOf:
                      - type: string
                      - type: 'null'
                  void_reason:
                    description: >-
                      Optional reason recorded with the void request. Internal —
                      never shown to the partner.
                    anyOf:
                      - type: string
                      - type: 'null'
                  created_at:
                    type: string
                  updated_at:
                    type: string
                  signers:
                    type: array
                    items:
                      type: object
                      properties:
                        uuid:
                          type: string
                        role_name:
                          type: string
                          description: >-
                            The template role this signer fills (e.g. `signer`,
                            `approver`).
                        routing_order:
                          type: number
                          description: Signing order within the envelope; 1 signs first.
                        contact_uuid:
                          description: >-
                            Partnership contact this signer resolves to, when
                            the role kind is `partner_contact`.
                          anyOf:
                            - type: string
                            - type: 'null'
                        user_uuid:
                          description: >-
                            Company member this signer resolves to, when the
                            role kind is `company_user`.
                          anyOf:
                            - type: string
                            - type: 'null'
                        email:
                          type: string
                        name:
                          type: string
                        status:
                          type: string
                          enum:
                            - pending
                            - sent
                            - viewed
                            - signed
                            - declined
                          description: >-
                            Recipient lifecycle, reported by the provider's
                            installation: `pending` until the send, then `sent`,
                            `viewed`, `signed` or `declined`.
                        sent_at:
                          anyOf:
                            - type: string
                            - type: 'null'
                        viewed_at:
                          anyOf:
                            - type: string
                            - type: 'null'
                        signed_at:
                          anyOf:
                            - type: string
                            - type: 'null'
                        declined_at:
                          anyOf:
                            - type: string
                            - type: 'null'
                      required:
                        - uuid
                        - role_name
                        - routing_order
                        - contact_uuid
                        - user_uuid
                        - email
                        - name
                        - status
                        - sent_at
                        - viewed_at
                        - signed_at
                        - declined_at
                      additionalProperties: false
                required:
                  - uuid
                  - partnership_uuid
                  - agreement_template_uuid
                  - name
                  - status
                  - provider_key
                  - external_ref
                  - failure_reason
                  - requested_by_user_uuid
                  - signed_asset_uuid
                  - certificate_asset_uuid
                  - sent_at
                  - viewed_at
                  - completed_at
                  - declined_at
                  - voided_at
                  - expired_at
                  - failed_at
                  - expires_at
                  - void_requested_at
                  - void_reason
                  - created_at
                  - updated_at
                  - signers
                additionalProperties: false
components:
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: API key authentication. Use "Bearer <api_key>" or "Api-Key <api_key>".

````

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