Sources


Sources are created in their own endpoint, after which you can then connect a source to a contact.

The following fields relate to the Sources endpoint.

FieldLimitsRequired?Writeable?
id
NoNo

The id of the source

name
200 characters
NoYes

The name of the source

user_id
integer
NoNo

The id of the user who created this source

Visibility

The sources that are returned are ones that you created.

Retrieving Sources

GET https://api-v2.liondesk.com//contact-sources headers: { Authorization: "Bearer [access token]", Content-Type: "application/json" }

If you intend to get a specific source, submit a get request for /contact-sources/id.

Submitting a source

Submit a source to have it saved to LionDesk.

POST https://api-v2.liondesk.com//contact-sources headers: { Authorization: "Bearer [access token]", Content-Type: "application/json" }
{ "name": "Zillow" }

Updating sources

You may update a source by including the fields you want to change

PATCH https://api-v2.liondesk.com//contact-sources/149 headers: { Authorization: "Bearer [access token]", Content-Type: "application/json" }
{ "name": "Facebook" }

Removing sources

To delete a source, simply submit a delete request and specify the id of the source to delete. This will return information corresponding to the source you deleted.

DELETE https://api-v2.liondesk.com//contact-sources/149 headers: { Authorization: "Bearer [access token]", Content-Type: "application/json" }
{ "id": 149, "name": "Zillow", "user_id": 1 }

Deleting a source from a contact

To delete a source from a contact, you must submit an id of 0 or null.

PATCH https://api-v2.liondesk.com//contacts/1 headers: { Authorization: "Bearer [access token]", Content-Type: "application/json" }
{ "source_id": 0 }

Adding or Updating a contact's source

To change which source a contact has, submit a different source id.

PATCH https://api-v2.liondesk.com//contacts/1 headers: { Authorization: "Bearer [access token]", Content-Type: "application/json" }
{ "source_id": 148 }

This is also how you would add a source to a contact.