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

# Send compliance documents

> Emails the unit's current compliance documents (EPC, electric safety, gas safety) to the tenancy's customers.



## OpenAPI

````yaml openapi-leasing.json POST /v1/tenancies/{id}/send_compliance
openapi: 3.1.0
info:
  title: Yorlet Leasing API
  description: >-
    APIs for managing applications, deposits, guarantors, references, and
    tenancies.
  version: 1.0.0
servers:
  - url: https://api.yorlet.com
    description: Production
  - url: https://api.yorlet.io
    description: Sandbox
security: []
paths:
  /v1/tenancies/{id}/send_compliance:
    post:
      tags:
        - Tenancies
      summary: Send compliance documents
      description: >-
        Emails the unit's current compliance documents (EPC, electric safety,
        gas safety) to the tenancy's customers.
      operationId: tenancies_send_compliance
      parameters:
        - schema:
            type: string
            description: The id identifier.
          required: true
          description: The id identifier.
          name: id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                override_subject:
                  type:
                    - string
                    - 'null'
                  minLength: 1
                  maxLength: 255
                  description: >-
                    An optional subject line to use for the compliance documents
                    email instead of the default.
      responses:
        '200':
          description: Returns the tenancy.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: Unique identifier for the object.
                  created:
                    type: number
                    description: >-
                      Time at which the object was created. Measured in seconds
                      since the Unix epoch.
                  account:
                    type: string
                    description: >-
                      The account that the object belongs to. Only returned if
                      the request is made with a valid Yorlet-Context header.
                  deleted:
                    type: boolean
                    default: false
                    description: Only returned if the object has been deleted.
                  object:
                    type: string
                    enum:
                      - tenancy
                  applicants:
                    type: object
                    properties:
                      count:
                        type: number
                        description: Total number of items in the list.
                        example: 1
                      has_more:
                        type: boolean
                        description: Whether more items are available.
                        example: false
                      object:
                        type: string
                        enum:
                          - list
                      data:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              description: Unique identifier for the object.
                            created:
                              type: number
                              description: >-
                                Time at which the object was created. Measured
                                in seconds since the Unix epoch.
                            account:
                              type: string
                              description: >-
                                The account that the object belongs to. Only
                                returned if the request is made with a valid
                                Yorlet-Context header.
                            deleted:
                              type: boolean
                              default: false
                              description: Only returned if the object has been deleted.
                            object:
                              type: string
                              enum:
                                - application.applicant
                            application:
                              type: string
                              pattern: ^[a-zA-Z0-9_]+$
                              description: >-
                                The identifier of the application the applicant
                                belongs to.
                            advance_rent:
                              type: object
                              properties:
                                amount:
                                  type: number
                                  description: The advance rent amount for the applicant.
                                paid:
                                  type: boolean
                                  description: Whether the advance rent has been paid.
                                paid_off_platform:
                                  type: boolean
                                  description: >-
                                    Whether the advance rent was paid off
                                    platform.
                                transaction:
                                  type:
                                    - string
                                    - 'null'
                                  description: >-
                                    The identifier of the advance rent
                                    transaction.
                              description: The advance rent details for the applicant.
                            currency:
                              type: string
                              enum:
                                - gbp
                                - usd
                                - eur
                                - sek
                              description: The currency for the applicant.
                              example: gbp
                            customer:
                              anyOf:
                                - type: string
                                - type: object
                                  additionalProperties: {}
                              description: The customer associated with the applicant.
                            deposit:
                              type: object
                              properties:
                                amount:
                                  type: number
                                  description: The deposit amount for the applicant.
                                paid:
                                  type: boolean
                                  description: Whether the deposit has been paid.
                                paid_off_platform:
                                  type: boolean
                                  description: Whether the deposit was paid off platform.
                                transaction:
                                  type:
                                    - string
                                    - 'null'
                                  description: The identifier of the deposit transaction.
                              required:
                                - amount
                                - paid
                                - paid_off_platform
                                - transaction
                              description: The deposit details for the applicant.
                            guarantor:
                              type:
                                - string
                                - 'null'
                              description: >-
                                The identifier of the guarantor for the
                                applicant.
                            guarantor_contract:
                              type:
                                - string
                                - 'null'
                              description: >-
                                The identifier of the guarantor contract for the
                                applicant.
                            holding_fee:
                              type: object
                              properties:
                                amount:
                                  type: number
                                  description: The holding fee amount for the applicant.
                                paid:
                                  type: boolean
                                  description: Whether the holding fee has been paid.
                                paid_off_platform:
                                  type: boolean
                                  description: >-
                                    Whether the holding fee was paid off
                                    platform.
                                transaction:
                                  type:
                                    - string
                                    - 'null'
                                  description: >-
                                    The identifier of the holding fee
                                    transaction.
                              description: The holding fee details for the applicant.
                            lead_tenant:
                              type: boolean
                              description: Whether the applicant is the lead tenant.
                            pets:
                              type: array
                              items:
                                type: object
                                properties:
                                  age:
                                    type:
                                      - number
                                      - 'null'
                                    description: The age of the pet.
                                  name:
                                    type:
                                      - string
                                      - 'null'
                                    description: The name of the pet.
                                  type:
                                    type: string
                                    enum:
                                      - dog
                                      - cat
                                      - small_animal
                                      - bird
                                      - fish
                                      - other
                                    description: The species of the pet.
                                required:
                                  - age
                                  - name
                                  - type
                              description: The pets of the applicant.
                            permitted_occupier:
                              type: boolean
                              description: Whether the applicant is a permitted occupier.
                            pre_qualification:
                              type: object
                              properties:
                                affordability:
                                  type: object
                                  properties:
                                    company_name:
                                      type: string
                                      description: >-
                                        The name of the company the applicant
                                        works for.
                                    gross_annual_salary:
                                      type: number
                                      description: >-
                                        The gross annual salary of the
                                        applicant.
                                    role:
                                      type: string
                                      description: The role of the applicant.
                                  description: The affordability details for the applicant.
                                nationality:
                                  type: string
                                  description: The nationality of the applicant.
                              description: The pre-qualification details for the applicant.
                            requirements:
                              type: object
                              properties:
                                guarantor:
                                  type: boolean
                                  description: Whether the applicant needs a guarantor.
                              required:
                                - guarantor
                            share_of_rent:
                              type: number
                              description: The share of rent for the applicant.
                            status:
                              type: string
                              description: The status of the applicant.
                            tos_acceptance:
                              type:
                                - object
                                - 'null'
                              properties:
                                date:
                                  type:
                                    - number
                                    - 'null'
                                  description: The date the terms of service were accepted.
                                ip:
                                  type:
                                    - string
                                    - 'null'
                                  description: >-
                                    The IP address from which the terms of
                                    service were accepted.
                              required:
                                - date
                                - ip
                              description: >-
                                The terms of service acceptance details for the
                                applicant.
                            verification_session:
                              anyOf:
                                - type: string
                                - type: object
                                  additionalProperties: {}
                                - type: 'null'
                              description: >-
                                The verification session associated with the
                                applicant.
                            verification_session_required:
                              type: boolean
                              description: >-
                                Whether the applicant is required to complete a
                                verification session.
                          required:
                            - id
                            - created
                            - object
                            - application
                            - advance_rent
                            - currency
                            - customer
                            - deposit
                            - guarantor
                            - guarantor_contract
                            - holding_fee
                            - lead_tenant
                            - permitted_occupier
                            - requirements
                            - share_of_rent
                            - status
                            - tos_acceptance
                            - verification_session
                            - verification_session_required
                    required:
                      - count
                      - has_more
                      - object
                      - data
                    description: >-
                      The applicants (tenants) for the tenancy. Only returned
                      when included.
                  assignee:
                    type:
                      - string
                      - 'null'
                    description: ID of the user assigned to manage this tenancy.
                  building:
                    anyOf:
                      - type: string
                      - type: object
                        additionalProperties: {}
                      - type: 'null'
                    description: ID of the building where this tenancy is located.
                  building_snapshot:
                    type: object
                    properties:
                      name:
                        type: string
                      single_unit:
                        type: boolean
                    required:
                      - name
                      - single_unit
                    description: Snapshot of building data at the time of tenancy creation.
                  cancel_at:
                    type:
                      - integer
                      - 'null'
                    description: >-
                      Scheduled date for tenancy cancellation. Measured in
                      seconds since the Unix epoch.
                  cancel_reason:
                    type:
                      - string
                      - 'null'
                    description: Reason code for tenancy cancellation.
                  cancel_reason_description:
                    type:
                      - string
                      - 'null'
                    description: Detailed description of why the tenancy was cancelled.
                  canceled_at:
                    type:
                      - integer
                      - 'null'
                    description: >-
                      Date and time when the tenancy was actually cancelled.
                      Measured in seconds since the Unix epoch.
                  contract_address:
                    type:
                      - string
                      - 'null'
                    description: Physical address specified in the tenancy contract.
                  currency:
                    type: string
                    enum:
                      - gbp
                      - usd
                      - eur
                      - sek
                    description: Currency code for all monetary amounts in this tenancy.
                    example: gbp
                  customer_emails:
                    type: array
                    items:
                      type:
                        - string
                        - 'null'
                    description: The customer emails for the tenancy.
                  customers:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        email:
                          type:
                            - string
                            - 'null'
                        name:
                          type:
                            - string
                            - 'null'
                      required:
                        - id
                    description: The customers for the tenancy.
                  date_end:
                    type:
                      - integer
                      - 'null'
                    description: >-
                      Contractual end date of the tenancy period. Measured in
                      seconds since the Unix epoch.
                  date_start:
                    type: integer
                    description: >-
                      Contractual start date of the tenancy period. Measured in
                      seconds since the Unix epoch.
                  deposit:
                    type:
                      - object
                      - 'null'
                    properties:
                      deposit_total:
                        type:
                          - number
                          - 'null'
                        description: The total deposit amount for the tenancy.
                      deposit_per_applicant:
                        type:
                          - number
                          - 'null'
                        description: The deposit amount per applicant.
                    description: Deposit information and amounts for the tenancy.
                  end_behavior:
                    type:
                      - string
                      - 'null'
                    enum:
                      - roll
                      - complete
                      - null
                    description: The end behavior for the tenancy.
                  has_owner:
                    type: boolean
                    description: Whether the unit associated with this tenancy has owners.
                  metadata:
                    type:
                      - object
                      - 'null'
                    additionalProperties:
                      type: string
                    description: >-
                      Set of key-value pairs that you can attach to an object.
                      This can be useful for storing additional information
                      about the object in a structured format.
                  move_in_date:
                    type:
                      - integer
                      - 'null'
                    description: The date the tenant is expected to move in.
                  move_out_date:
                    type:
                      - integer
                      - 'null'
                    description: The date the tenant is expected to move out.
                  renewal_intent:
                    type:
                      - string
                      - 'null'
                    description: ID of the renewal intent record if the tenancy has one.
                  review:
                    type:
                      - object
                      - 'null'
                    properties:
                      assignee:
                        type:
                          - string
                          - 'null'
                        description: >-
                          The identifier of the user assigned to the tenancy
                          review.
                      create_renewal_intent:
                        type: boolean
                        description: >-
                          Whether to create a renewal intent automatically when
                          the review is due.
                      due_at:
                        type:
                          - integer
                          - 'null'
                        description: The date and time the tenancy review is due.
                      notification_channels:
                        type: array
                        items:
                          type: string
                          enum:
                            - dashboard
                            - email
                        description: >-
                          The notification channels to use for the tenancy
                          review.
                    description: The tenancy review details.
                  status:
                    type: string
                    enum:
                      - active
                      - canceled
                      - complete
                      - pending
                    description: Current status of the tenancy.
                  subscription_data:
                    type: object
                    properties:
                      billing_anchor:
                        type:
                          - number
                          - 'null'
                      collection_method:
                        type: string
                        enum:
                          - charge_automatically
                          - send_invoice
                      interval:
                        type: string
                        enum:
                          - month
                          - week
                          - custom
                          - upfront
                      interval_count:
                        type: number
                      items:
                        type: array
                        items: {}
                      phases:
                        type: array
                        items: {}
                    description: Subscription-related data for recurring tenancy payments.
                  type:
                    type: string
                    enum:
                      - active_tenancy
                      - let_only
                      - renewal
                      - standard
                    description: The type of the tenancy.
                  unit:
                    anyOf:
                      - type: string
                      - type: object
                        additionalProperties: {}
                      - type: 'null'
                    description: ID of the specific unit within the building being rented.
                  unit_snapshot:
                    type: object
                    properties:
                      name:
                        type: string
                    required:
                      - name
                    description: Snapshot of unit data at the time of tenancy creation.
                required:
                  - id
                  - created
                  - object
                  - building
                  - building_snapshot
                  - cancel_at
                  - canceled_at
                  - customers
                  - date_end
                  - date_start
                  - has_owner
                  - status
                  - type
                  - unit
                  - unit_snapshot
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: API Key authentication. Use "Bearer YOUR_API_KEY".

````