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

# Issue a contract

> Issue a contract. <h3>OAuth</h3>Required scopes: <code>community</code>



## OpenAPI

````yaml /assets/openapi.json post /contracts/v1/{id}/issue
openapi: 3.0.2
info:
  title: Spacebring
  version: 1.0.0
  termsOfService: https://www.spacebring.com/terms
servers:
  - url: https://api.spacebring.com
security: []
paths:
  /contracts/v1/{id}/issue:
    post:
      tags:
        - Contracts
      summary: Issue a contract
      description: 'Issue a contract. <h3>OAuth</h3>Required scopes: <code>community</code>'
      operationId: issueContract
      parameters:
        - in: header
          name: spacebring-network-id
          schema:
            type: string
            format: uuid
          required: false
          description: >-
            The id of the network. Required when using bearer token
            authentication
        - in: path
          name: id
          schema:
            type: string
            format: uuid
          required: true
          description: The id of the contract.
      requestBody:
        $ref: '#/components/requestBodies/issueContract'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  contract:
                    $ref: '#/components/schemas/contract'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/responseError'
      security:
        - BasicAuth: []
        - OAuth2:
            - community
components:
  requestBodies:
    issueContract:
      content:
        application/json:
          schema:
            type: object
            properties:
              signatureMethod:
                description: How the contract will be signed.
                type: string
                enum:
                  - eSignature
                  - manual
            required:
              - signatureMethod
      required: true
  schemas:
    contract:
      type: object
      properties:
        action:
          description: Billing action associated with the contract.
          type: string
          enum:
            - subscription
            - invoice
            - none
        actionable:
          description: Whether the contract triggers a billing action when signed.
          type: boolean
        createDate:
          description: ISO timestamp of when the contract was created.
          type: string
          format: date-time
        customer:
          description: Customer associated with the contract.
          type: object
          properties:
            company:
              description: Company details, present when the customer is a company.
              type: object
              properties:
                logo:
                  description: Company logo file.
                  type: object
                  properties:
                    key:
                      type: string
                    url:
                      type: string
                  required:
                    - key
                    - url
                  additionalProperties: false
                publicLogoUrl:
                  description: Public logo URL from logo.dev.
                  type: string
                title:
                  description: Company name.
                  type: string
              required:
                - title
              additionalProperties: false
            id:
              description: Customer ID.
              type: string
              format: uuid
            user:
              description: User details, present when the customer is a membership.
              type: object
              properties:
                about:
                  description: User bio.
                  type: string
                email:
                  description: User email address.
                  type: string
                id:
                  description: User ID.
                  type: string
                  format: uuid
                name:
                  description: First name.
                  type: string
                phoneNumber:
                  description: Phone number.
                  type: string
                photoUrl:
                  description: Profile photo URL.
                  nullable: true
                  type: string
                surname:
                  description: Last name.
                  type: string
              required:
                - email
                - id
                - name
                - photoUrl
              additionalProperties: false
          required:
            - id
          additionalProperties: false
        customerRef:
          description: ID of the customer (membership or company).
          type: string
          format: uuid
        endDate:
          description: Contract end date.
          type: string
          format: date-time
        expirationDate:
          description: Date after which the contract can no longer be signed.
          type: string
          format: date-time
        id:
          description: Unique identifier of the contract.
          type: string
          format: uuid
        issueDate:
          description: Date the contract was issued.
          type: string
          format: date-time
        items:
          description: Line items included in this contract.
          type: array
          items:
            type: object
            properties:
              couponRef:
                description: Applied coupon ID.
                type: string
                format: uuid
              entire:
                description: Whether the item covers the entire plan.
                type: boolean
              optionRef:
                description: Shop product option ID.
                type: string
                format: uuid
              period:
                description: Billing period (e.g. MONTH, YEAR).
                type: string
              planRef:
                description: Membership plan ID.
                type: string
                format: uuid
              price:
                description: Item price override.
                type: number
              productRef:
                description: Shop product ID.
                type: string
                format: uuid
              quantity:
                description: Number of units.
                type: number
              resourceRef:
                description: Resource ID.
                type: string
                format: uuid
              tierRef:
                description: Plan tier ID.
                type: string
                format: uuid
              title:
                description: Display name of the item.
                type: string
              type:
                description: Item type.
                type: string
                enum:
                  - plan
                  - resource
                  - oneOff
            required:
              - quantity
              - title
              - type
            additionalProperties: false
        locationRef:
          description: ID of the location this contract belongs to.
          type: string
          format: uuid
        signedDocument:
          description: Signed document file, present after the contract is signed.
          type: object
          properties:
            key:
              type: string
            url:
              type: string
          required:
            - key
            - url
          additionalProperties: false
        signers:
          description: People required to sign this contract.
          type: array
          items:
            type: object
            properties:
              declinedDate:
                description: Date this signer declined.
                type: string
                format: date-time
              email:
                description: Signer email address.
                type: string
              id:
                description: Signer ID.
                type: string
                format: uuid
              name:
                description: Signer first name.
                type: string
              order:
                description: Signing order index.
                type: number
              phoneNumber:
                description: Phone number.
                type: string
              signedDate:
                description: Date this signer signed.
                type: string
                format: date-time
              status:
                description: Current signer status.
                type: string
              surname:
                description: Signer last name.
                type: string
              type:
                description: Whether this is a location or customer signer.
                type: string
                enum:
                  - location
                  - customer
            required:
              - email
              - id
              - name
              - type
            additionalProperties: false
        startDate:
          description: Contract start date.
          type: string
          format: date-time
        status:
          description: Current contract status.
          type: string
          enum:
            - draft
            - issued
            - signed
            - declined
        templateRef:
          description: ID of the template used to generate this contract.
          type: string
          format: uuid
        terminationDate:
          description: Date the contract was terminated.
          type: string
          format: date-time
        terminationReason:
          description: Reason for termination.
          type: string
        title:
          description: Contract title.
          type: string
        unsignedDocument:
          description: Unsigned document file, present after the contract is issued.
          type: object
          properties:
            key:
              type: string
            url:
              type: string
          required:
            - key
            - url
          additionalProperties: false
      required:
        - action
        - actionable
        - createDate
        - customer
        - customerRef
        - expirationDate
        - id
        - locationRef
        - signers
        - status
        - templateRef
        - title
      additionalProperties: false
    responseError:
      type: object
      properties:
        message:
          type: string
        type:
          type: string
  securitySchemes:
    BasicAuth:
      type: http
      description: >-
        See our [authentication
        documentation](https://www.spacebring.com/docs/api-reference/authentication#basic-authentication)
        for how to authorize your requests
      scheme: basic
    OAuth2:
      type: oauth2
      description: >-
        See our [authentication
        documentation](https://www.spacebring.com/docs/api-reference/authentication#oauth2)
        for how to authorize your requests
      flows:
        authorizationCode:
          authorizationUrl: https://api.spacebring.com/oauth2/authorize
          tokenUrl: https://api.spacebring.com/oauth2/token
          refreshUrl: https://api.spacebring.com/oauth2/token
          scopes:
            benefits.readonly: Read benefits and applications
            benefits: Read and write benefits and applications
            community.readonly: Read community companies and memberships
            community: Read and write community companies and memberships
            events.readonly: Read events and tickets
            events: Read and write events and tickets
            feed.readonly: Read feed posts
            feed: Read and write feed posts
            invoices.readonly: Read invoices
            invoices: Read and write invoices
            locations.readonly: Read locations
            locations: Read and write locations
            plans.readonly: Read plans
            plans: Read and write plans
            resources.readonly: Read resources and bookings
            resources: Read and write resources and bookings
            subscriptions.readonly: Read subscriptions
            subscriptions: Read and write subscriptions
            shop.readonly: Read products and orders
            shop: Read and write products and orders
            support.readonly: Read support tickets
            support: Read and write support tickets
            transactions.readonly: Read transactions
            transactions: Read and write transactions
            visitors.readonly: Read visitors
            visitors: Read and write visitors

````