TrustLayer tags API

The tags API from TrustLayer — 4 operation(s) for tags.

OpenAPI Specification

trustlayer-tags-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: TrustLayer Platform Auth tags API
  version: '1.0'
  contact:
    name: TrustLayer Support
    email: support@trustlayer.io
  termsOfService: https://trustlayer.io/terms-of-service
  externalDocs:
    description: OpenAPI specification
    url: /v1/platform-api.yaml
  description: '3rd-party API for the TrustLayer platform.


    **Deprecated.** Platform API v1 is deprecated as of 01 June 2026 and is

    scheduled for sunset (end-of-life) on 31 March 2027. It remains fully

    available until the sunset date but will not receive new features. Please

    migrate to Platform API v2 for new integrations.


    All v1 responses carry the standard deprecation response headers

    ([RFC 8594](https://www.rfc-editor.org/rfc/rfc8594)):


    ```http

    Deprecation: @1780272000

    Sunset: Wed, 31 Mar 2027 23:59:59 GMT

    Link: <https://developers.trustlayer.io/>; rel="deprecation", <https://developers.trustlayer.io/>; rel="sunset"

    ```


    `Deprecation: @1780272000` is the Unix timestamp for 2026-06-01T00:00:00Z;

    sunset (end-of-life) is 2027-03-31T23:59:59 GMT.'
  x-deprecated: true
  x-deprecation-date: '2026-06-01'
  x-sunset: '2027-03-31'
  license:
    name: Apache 2.0
    url: https://apache.org/licenses/LICENSE-2.0
servers:
- url: http://localhost:4000/v1
  description: Local
- url: https://api.trustlayer.io/v1
  description: Production
security:
- API Key: []
tags:
- name: tags
paths:
  /tags:
    parameters: []
    get:
      summary: List tags
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    $ref: '#/components/schemas/response-status'
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/tag'
                  meta:
                    $ref: '#/components/schemas/collection-meta'
      operationId: get-tags
      deprecated: true
      description: 'Note: all tags are returned, in alphabetical order.'
      tags:
      - tags
    post:
      summary: Create a new tag
      operationId: post-tags
      deprecated: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    $ref: '#/components/schemas/response-status'
                  data:
                    $ref: '#/components/schemas/tag'
      tags:
      - tags
      description: The tag name must be unique
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                tag:
                  $ref: '#/components/schemas/tag-input'
              required:
              - tag
  /tags/{tagId}:
    parameters:
    - schema:
        type: string
      name: tagId
      in: path
      required: true
      description: Tag ID
    delete:
      summary: Remove a tag
      operationId: delete-tags-id
      deprecated: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    $ref: '#/components/schemas/response-status'
                  data:
                    $ref: '#/components/schemas/tag'
      tags:
      - tags
      description: Note that this will also remove all related taggings
  /parties/{partyId}/relationships/tags:
    parameters:
    - schema:
        type: string
      name: partyId
      in: path
      required: true
      description: Party ID
    post:
      summary: Tag a party
      operationId: post-parties-:id-tags
      deprecated: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    $ref: '#/components/schemas/response-status'
                  data:
                    $ref: '#/components/schemas/party'
      tags:
      - tags
      description: Add one or more tags to a party. If an expiration date is passed, it will be applied to all the tags.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                tags:
                  $ref: '#/components/schemas/reference-list-input'
                expiresAt:
                  type: string
                  x-stoplight:
                    id: igcouna7q1x73
                  format: date
              required:
              - tags
    delete:
      summary: ''
      operationId: delete-parties-:id-tags
      deprecated: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    $ref: '#/components/schemas/response-status'
                  data:
                    $ref: '#/components/schemas/party'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                tags:
                  $ref: '#/components/schemas/reference-list-input'
      description: Remove one or more tags from a party.
      tags:
      - tags
  /parties/{partyId}/relationships/tags/{tagId}:
    parameters:
    - schema:
        type: string
      name: partyId
      in: path
      required: true
    - schema:
        type: string
      name: tagId
      in: path
      required: true
    delete:
      summary: Remove a tag from a party
      operationId: delete-parties-partyId-relationships-tags-tagId
      deprecated: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    $ref: '#/components/schemas/response-status'
                  data:
                    $ref: '#/components/schemas/party'
      tags:
      - tags
      description: If you need to remove multiple tags at once you can use the alternative endpoint `DELETE /parties/{partyId}/relationships/tags`
components:
  schemas:
    project:
      title: Project
      type: object
      x-examples:
        Example project:
          type: projects
          id: 60a3dc67cba60c04739e8e46
          name: Test Project
          parties:
          - id: 60896067dd86e01e90199f42
            type: parties
          customData:
          - value: '123'
            customField:
              type: customFields
              id: 60896067dd86e01e90199f42
          externalIds:
            procore:
            - id: '49843945'
      properties:
        type:
          type: string
          default: projects
          readOnly: true
        id:
          type: string
        name:
          type: string
        description:
          type: string
          nullable: true
        startDate:
          type: string
          format: date-time
          nullable: true
        endDate:
          type: string
          format: date-time
          nullable: true
        active:
          type: boolean
        parties:
          type: array
          items:
            oneOf:
            - $ref: '#/components/schemas/reference'
            - $ref: '#/components/schemas/party'
            - type: string
        customData:
          type: array
          items:
            type: object
            properties:
              value:
                type: string
              customField:
                oneOf:
                - $ref: '#/components/schemas/reference'
                - $ref: '#/components/schemas/custom-field'
        complianceStatus:
          type: object
          properties:
            status:
              type: string
              enum:
              - compliant
              - non_compliant
            compliantPartiesCount:
              type: number
            totalPartiesCount:
              type: number
            complianceScore:
              type: number
        deletedAt:
          type: string
          format: date-time
          nullable: true
        deletedBy:
          oneOf:
          - nullable: true
          - $ref: '#/components/schemas/reference'
        externalIds:
          type: object
          x-stoplight:
            id: uw5iuj9nds4en
    tag-input:
      title: tag-input
      type: object
      properties:
        name:
          type: string
          minLength: 3
          description: Tag name
        color:
          type: string
          pattern: ^#[0-9a-f]{6}$
          example: '#ff0000'
          description: Color of the tag in hex format
          minLength: 7
          maxLength: 7
      required:
      - name
      x-internal: true
      x-tags:
      - input
    reference-list-input:
      type: array
      title: reference-list-input
      x-tags:
      - input
      minItems: 1
      items:
        type: object
        properties:
          id:
            type: string
            pattern: ^[a-z0-9]{24}$
            minLength: 24
            maxLength: 24
        required:
        - id
      x-internal: true
    compliance-document:
      x-internal: true
      title: Compliance Document
      type: object
      properties:
        id:
          type: string
        origin:
          type: string
          enum:
          - upload
          - makeCompliant
          - connectedDocument
          - fillableForm
          - webForm
        complianceStatus:
          type: string
          enum:
          - compliant
          - non_compliant
    party:
      title: Party
      type: object
      x-examples:
        Example Party:
          id: 60896067dd86e01e90199f42
          name: Test Party
          address:
            line1: 123 Main Street
            line2: ''
            city: Pleasantville
            postalCode: '10200'
            region: NY
            country: US
          type: Vendor
          status: new
          customData:
          - value: '123'
            customField:
              type: customFields
              id: 60896067dd86e01e90199f42
          externalIds:
            procore:
            - id: '49843945'
      properties:
        type:
          type: string
          default: parties
          readOnly: true
        id:
          type: string
          readOnly: true
        name:
          type: string
        address:
          $ref: '#/components/schemas/address'
        status:
          type: string
          enum:
          - new
          - compliant
          - non_compliant
          - inactive
          readOnly: true
        contacts:
          type: array
          items:
            $ref: '#/components/schemas/contact'
        website:
          type: string
          nullable: true
        active:
          type: boolean
        notes:
          type: string
          nullable: true
        complianceStatus:
          $ref: '#/components/schemas/compliance-status'
        projects:
          type: array
          items:
            oneOf:
            - $ref: '#/components/schemas/reference'
            - $ref: '#/components/schemas/project'
        projectStats:
          type: object
          properties:
            compliantProjectsCount:
              type: number
            totalProjectsCount:
              type: number
        documents:
          type: array
          items:
            oneOf:
            - $ref: '#/components/schemas/reference'
            - $ref: '#/components/schemas/document'
        partyType:
          oneOf:
          - $ref: '#/components/schemas/reference'
          - $ref: '#/components/schemas/party-type'
        tags:
          type: array
          items:
            oneOf:
            - $ref: '#/components/schemas/taggging'
            - $ref: '#/components/schemas/taggging-full'
        complianceProfile:
          oneOf:
          - $ref: '#/components/schemas/reference'
          - $ref: '#/components/schemas/compliance-profile'
          - nullable: true
        customData:
          type: array
          items:
            type: object
            properties:
              value:
                type: string
              customField:
                oneOf:
                - $ref: '#/components/schemas/reference'
                - $ref: '#/components/schemas/custom-field'
        deletedAt:
          type: string
          format: date-time
          nullable: true
        deletedBy:
          oneOf:
          - nullable: true
          - $ref: '#/components/schemas/reference'
        externalIds:
          type: object
          x-stoplight:
            id: zk87opteuie3w
    compliance-status:
      type: object
      title: Compliance Status
      properties:
        complianceProfile:
          $ref: '#/components/schemas/reference'
        nextExpirationDate:
          type: string
          format: date-time
          nullable: true
        latestExpirationDate:
          type: string
          format: date-time
          nullable: true
        modules:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              label:
                type: string
              status:
                type: string
                enum:
                - compliant
                - non_compliant
              documents:
                type: array
                items:
                  $ref: '#/components/schemas/compliance-document'
              documentsCount:
                type: number
                example: 1
              subjects:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                    label:
                      type: string
                    status:
                      type: string
                      enum:
                      - compliant
                      - non_compliant
                      - waived
                      - overridden
                    notes:
                      type: string
                    effectiveDate:
                      type: string
                      format: date-time
                      nullable: true
                    expirationDate:
                      type: string
                      format: date-time
                      nullable: true
                    latestExpirationDate:
                      type: string
                      format: date-time
                      nullable: true
                    latestValidEffectiveDate:
                      type: string
                      format: date-time
                      nullable: true
                    latestValidExpirationDate:
                      type: string
                      format: date-time
                      nullable: true
                    documents:
                      type: array
                      items:
                        $ref: '#/components/schemas/compliance-document'
                    documentsCount:
                      type: number
                    resetOn:
                      type: string
                      format: date-time
                      nullable: true
                    requirements:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: string
                          label:
                            type: string
                          moduleId:
                            type: string
                          moduleLabel:
                            type: string
                          subjectId:
                            type: string
                          subjectLabel:
                            type: string
                          attributeId:
                            type: string
                          attributeLabel:
                            type: string
                          attributeDescription:
                            type: string
                          matchingCriteria:
                            type: string
                            enum:
                            - matchOnce
                            - matchRepeatedly
                          operator:
                            type: string
                            enum:
                            - must be present
                            - must be greater or equal to
                            - must be less or equal to
                            - must be completed by
                            - at least one must be present from list
                          targetValue:
                            type: string
                          value:
                            type: string
                          status:
                            type: string
                            enum:
                            - compliant
                            - non_compliant
                            - waived
                            - overridden
                            - invalidated
                          invalidatedBy:
                            type: array
                            items:
                              type: string
                          notes:
                            type: string
                          publicNotes:
                            type: string
                          documents:
                            type: array
                            items:
                              $ref: '#/components/schemas/compliance-document'
                          documentsCount:
                            type: number
                          resetOn:
                            type: string
                            format: date-time
                            nullable: true
                          custom:
                            type: boolean
                        required:
                        - id
                        - label
                        - moduleId
                        - moduleLabel
                        - subjectId
                        - subjectLabel
                        - attributeId
                        - attributeLabel
                        - matchingCriteria
                        - operator
                        - status
                        - documents
                        - documentsCount
                        - custom
                  required:
                  - id
                  - label
                  - status
                  - documents
                  - documentsCount
                  - requirements
            required:
            - id
            - label
            - status
            - documents
            - documentsCount
            - subjects
        subjects:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              effectiveDate:
                type: string
                format: date-time
                nullable: true
              expirationDate:
                type: string
                format: date-time
                nullable: true
              latestValidEffectiveDate:
                type: string
                format: date-time
                nullable: true
              latestValidExpirationDate:
                type: string
                format: date-time
                nullable: true
              notes:
                type: string
              requirementsStatus:
                type: string
                enum:
                - compliant
                - non_compliant
                - waived
                - overridden
              resetRequirementsOn:
                type: string
                format: date-time
                nullable: true
        requirements:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              label:
                type: string
              operator:
                type: string
              targetValue:
                type: string
              actualValue:
                type: string
              status:
                type: string
                enum:
                - compliant
                - non_compliant
                - waived
                - overridden
                - invalidated
              waiverOrOverrideNotes:
                type: string
              waiverOrOverrideExpirationDate:
                type: string
                format: date-time
                nullable: true
        status:
          type: string
          enum:
          - compliant
          - non_compliant
        lastChangedAt:
          type: string
          format: date-time
      required:
      - complianceProfile
      - modules
      - subjects
      - requirements
      - status
      x-examples:
        Example compliance status:
          complianceProfile:
            id: 60a27c51fcd891823568ed27
            type: compliance-profiles
          nextExpirationDate: '2024-11-14T00:00:00.000Z'
          latestExpirationDate: '2025-12-19T23:59:59.999Z'
          modules:
          - id: evidenceOfInsurance
            label: Evidence of Insurance
            status: compliant
            documents:
            - id: 6877a0b2d7a1998eeb7f7f2f
              origin: upload
              complianceStatus: compliant
            documentsCount: 1
            subjects:
            - id: commercialGeneralLiability
              label: Commercial General Liability
              status: compliant
              notes: lorem ipsum dolor sit amet
              effectiveDate: '2024-11-14T00:00:00.000Z'
              expirationDate: '2025-11-14T23:59:59.999Z'
              latestExpirationDate: '2025-12-19T23:59:59.999Z'
              latestValidEffectiveDate: '2024-11-14T00:00:00.000Z'
              latestValidExpirationDate: '2025-11-14T23:59:59.999Z'
              documents:
              - id: 6877a0b2d7a1998eeb7f7f2f
                origin: upload
                complianceStatus: compliant
              documentsCount: 1
              resetOn: '2025-06-02T00:00:00.000Z'
              requirements:
              - id: evidenceOfInsurance.commercialGeneralLiability.evidenceOfInsuranceCommercialGeneralLiabilityGeneralAggregate
                label: 'Evidence of Insurance : Commercial General Liability : General Aggregate'
                moduleId: evidenceOfInsurance
                moduleLabel: Evidence of Insurance
                subjectId: commercialGeneralLiability
                subjectLabel: Commercial General Liability
                attributeId: evidenceOfInsuranceCommercialGeneralLiabilityGeneralAggregate
                attributeLabel: General Aggregate
                matchingCriteria: matchOnce
                operator: must be greater or equal to
                targetValue: '1000000'
                value: '2000000'
                status: compliant
                invalidatedBy:
                - evidenceOfInsuranceCommercialGeneralLiabilityAMBestRating
                notes: lorem ipsum dolor sit amet
                publicNotes: lorem ipsum dolor sit amet
                documents:
                - id: 6877a0b2d7a1998eeb7f7f2f
                  origin: upload
                  complianceStatus: compliant
                documentsCount: 1
                resetOn: '2025-06-02T00:00:00.000Z'
                custom: false
          subjects:
          - id: commercialGeneralLiability
            effectiveDate: '2024-11-14T00:00:00.000Z'
            expirationDate: '2025-11-14T23:59:59.999Z'
            latestValidEffectiveDate: '2024-11-14T00:00:00.000Z'
            latestValidExpirationDate: '2025-11-14T23:59:59.999Z'
            latestExpirationDate: '2025-12-19T23:59:59.999Z'
            notes: lorem ipsum dolor sit amet
            requirementsStatus: compliant
            resetRequirementsOn: '2025-06-02T00:00:00.000Z'
          requirements:
          - id: evidenceOfInsurance.commercialGeneralLiability.evidenceOfInsuranceCommercialGeneralLiabilityGeneralAggregate
            label: 'Evidence of Insurance : Commercial General Liability : General Aggregate'
            operator: must be greater or equal to
            targetValue: '1000000'
            actualValue: '2000000'
            status: compliant
            waiverOrOverrideNotes: lorem ipsum dolor sit amet
            waiverOrOverrideExpirationDate: '2025-06-02T00:00:00.000Z'
          status: compliant
          lastChangedAt: '2025-07-16T17:55:00.000Z'
    contact:
      title: Contact
      type: object
      x-examples:
        Example Contact:
          type: contacts
          id: 60896067dd86e01e90199f43
          name: Jane Smith
          company: Acme Inc
          email: jane.smith@example.com
          phone: (555) 555-5555
          fax: ''
          title: Director
          primary: true
          defaultRequestRecipient: false
          avatar: ''
          party:
            type: parties
            id: 60896067dd86e01e90199f43
      properties:
        type:
          type: string
          default: contacts
          readOnly: true
        id:
          type: string
          readOnly: true
        name:
          type: string
        company:
          type: string
        email:
          type: string
        phone:
          type: string
        fax:
          type: string
        title:
          type: string
        primary:
          type: boolean
          default: false
        defaultRequestRecipient:
          type: boolean
          default: false
        avatar:
          type: string
        party:
          oneOf:
          - $ref: '#/components/schemas/reference'
          - $ref: '#/components/schemas/party'
        externalId:
          type: string
          x-stoplight:
            id: 07yyrzkup5tdk
    user:
      description: ''
      type: object
      properties:
        id:
          type: string
        profile:
          type: object
          properties:
            name:
              type: string
              minLength: 1
            phone:
              type: string
            title:
              type: string
            avatar:
              type: string
            role:
              type: string
            department:
              type: string
            timezone:
              type: string
        email:
          type: string
          minLength: 1
        isActive:
          type: boolean
        type:
          type: string
          default: users
          readOnly: true
      title: User
    custom-field:
      title: Custom Field
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          default: custom-fields
        name:
          type: string
          description: Custom field label
        'description ':
          type: string
          description: Optional description
        color:
          type: string
          pattern: ^#[a-f0-9]{6}$
          description: 'Field color in #rrggbb format'
        fieldType:
          type: string
          default: text
          enum:
          - text
          - number
          - dropdown
        options:
          type: array
          description: List of options for the dropdown
          items:
            type: object
            properties:
              key:
                type: string
                description: Unique identifier for the option
              value:
                type: string
                description: Option label
        complianceProfile:
          oneOf:
          - $ref: '#/components/schemas/reference'
          - $ref: '#/components/schemas/compliance-profile'
        associatedEntities:
          type: array
          enum:
          - party
          - project
          description: List of entity types that can use this custom field
          items:
            type: string
    reference:
      title: Reference
      type: object
      properties:
        id:
          type: string
        type:
          type: string
      description: Generic object reference
      x-internal: false
      x-examples:
        Generic reference example:
          id: 60896067dd86e01e90199f43
          type: widgets
    document-type:
      description: ''
      type: object
      title: Document Type
      x-examples:
        Certificate of insurance:
          type: document-types
          id: 60a27c517fd4e152a9642347
          name: Certificate of Insurance
          system: true
          pluralName: Certificates of Insurance
      properties:
        type:
          type: string
          default: document-types
          readOnly: true
        id:
          type: string
        name:
          type: string
          minLength: 1
        system:
          type: boolean
        pluralName:
          type: string
          minLength: 1
      required:
      - id
      - name
      - system
      - pluralName
    response-status:
      type: string
      title: Response Status
      enum:
      - success
      - fail
      - error
      readOnly: true
      x-examples:
        Success: success
      description: The possible values are "success", "fail", and "error".
      x-internal: true
    tag:
      title: Tag
      type: object
      properties:
        type:
          type: string
          default: tags
        id:
          type: string
        name:
          type: string
        color:
          type: string
    party-type:
      title: Party Type
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          default: party-types
        name:
          type: string
        pluralName:
          type: string
        defaultComplianceProfile:
          oneOf:
          - $ref: '#/components/schemas/reference'
          - $ref: '#/components/schemas/compliance-profile'
      x-examples:
        Vendor:
          id: 60a27c51fcd891823568ed28
          type: party-types
          name: Vendor
          pluralName: Vendors
          defaultComplianceProfile:
            id: 60a27c51fcd891823568ed27
            type: compliance-profiles
    document:
      type: object
      title: Document
      x-examples:
        Example document:
          type: documents
          id: 60a27c51fcd891823568ed35
          issuedBy:
            name: ''
            address: ''
            contactName: ''
            phone: ''
            email: ''
          reviewedAt: '2019-08-24T14:15:22Z'
          archivedAt: '2019-08-24T14:15:22Z'
          notes: ''
          status: processed
          types:
          - type: document-types
            id: 60a27c517fd4e152a9642347
          flag:
            addedOn: '2019-08-24T14:15:22Z'
            severityLevel: low
            affectedSubjects:
            - string
            notes: ''
            user:
              id: 60a27c51fcd891823568ed24
              type: users
          appliesToAllProjects: true
          expirationDate: '2019-08-24'
          friendlyName: Acord25.pdf
          data: {}
          metadata: {}
          updatedAt: '2019-08-24T14:15:22Z'
          createdAt: '2019-08-24T14:15:22Z'
          archivedBy:
            id: 60a27c51fcd891823568ed24
            type: users
          reviewedBy: null
          url: https://trustlayer-documents.s3.us-west-1.amazonaws.com/...
          issueDate: '2019-01-22'
      properties:
        type:
          type: string
          default: documents
          readOnly: true
        id:
          type: string
          readOnly: true
        issuedBy:
          type: object
          properties:
            name:
              type: string
            address:
              type: string
            contactName:
              type: string
            phone:
              type: string
            email:
              type: string
        reviewedAt:
          type: string
          format: date-time
          readOnly: true
        archivedAt:
          type: string
          format: date-time
      

# --- truncated at 32 KB (39 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/trustlayer/refs/heads/main/openapi/trustlayer-tags-api-openapi.yml