Tags

Add ability to get, create, and apply tags from contacts

Get list of current tags

GET: /tags

200 Response Object

 {
 	"accountId": "string",
 	"createdAt": number,
 	"name": "string",
 	"id": "string",
 	"updatedAt": number
 }

Return

CODERETURN

200

Tag Object

401

Unauthorized

404

Returns account not found error

500

Internal Server Error

Create a new tag

POST: /tags

Body

FIELDTYPEDescription

name

string

the name of the tag

200 Response Object

{
    "tag": {
        "createdAt": number,
        "accountId": "string",
        "name": "string",
        "id": "string",
        "updatedAt": number
    },
    "message": "Successfully added the tag new to the database"
}

Return codes

CODERETURN

201

Created Value

400

Neo4j Error

401

Unauthorized

500

Internal Server Error

Apply tag to contact

POST: /tags/:tagId

Body

FIELDTYPEDescription

contactIds

array of strings

list of contact ids to apply

201 Response Object

{
    "tag": {
        "createdAt": number,
        "accountId": "string",
        "name": "string",
        "id": "string",
        "updatedAt": number
    },
    "message": "Successfully applied the tag ${tagId} to the contact"
}

Return codes

CODERETURN

201

Created Value

401

Unauthorized

404

Contact or tag not found

500

Internal Server Error

Last updated

Revision created on 1/5/2024