Reference

Build on the Lucra API.

Drag a sticker to move it, or use the arrow keys while focused.

Messages

Conversations with creators.

Conversations between an account and its creators. Threads start in the app; the API reads them and replies.

GET /v1/threads lists conversations and GET /v1/messages?thread=thr_… reads one. Reply with:

JSON
{ "thread": "thr_06ZqNevhUeDnqxzC6VkeuQr", "body": "Loved the first cut!" }

A partner replies as a roster creator with Lucra-Account: crtr_…. The message.created webhook tells you when one arrives.

Endpoints

GET/v1/messages
As creatorread

List messages

SDKlucra.messages.list({ query })

Query parameters

  • limitinteger
  • cursorstring
  • createdAfterstring

    Only items created at or after this time.

  • createdBeforestring

    Only items created before this time.

  • threadthr_…
Response200A page of items, 12 fields each, and nextCursorShow
  • idstring
  • threadstring
  • senderobject
    Show 4 child fields
    • idstring
    • typeenum
      organizationcreatorsupport
    • namestringnullable
    • avatarstringnullable
  • automatedboolean
  • bodystring
  • filesobject[]
    Show 8 child fields
    • idstring
    • namestring
    • kindenum
      imagevideodocument
    • sizenumbernullable
    • widthnumbernullable
    • heightnumbernullable
    • urlstringnullable
    • thumbnailUrlstringnullable
  • replyTostringnullable
  • reactionsobject[]
    Show 2 child fields
    • emojistring
    • actorsstring[]
  • createdAtstring
  • editedAtstringnullable
  • deletedAtstringnullable
  • versioninteger
POST/v1/messages
As creatorwrite

Send a message

SDKlucra.messages.create({ body })

Body

  • threadthr_…required
  • bodystring
  • filesfile_…[]

    Attachments: `chat_attachment` files.

  • replyTomsg_…
Response20112 fieldsShow
  • idstring
  • threadstring
  • senderobject
    Show 4 child fields
    • idstring
    • typeenum
      organizationcreatorsupport
    • namestringnullable
    • avatarstringnullable
  • automatedboolean
  • bodystring
  • filesobject[]
    Show 8 child fields
    • idstring
    • namestring
    • kindenum
      imagevideodocument
    • sizenumbernullable
    • widthnumbernullable
    • heightnumbernullable
    • urlstringnullable
    • thumbnailUrlstringnullable
  • replyTostringnullable
  • reactionsobject[]
    Show 2 child fields
    • emojistring
    • actorsstring[]
  • createdAtstring
  • editedAtstringnullable
  • deletedAtstringnullable
  • versioninteger
GET/v1/threads
As creatorread

List the conversations the account (or, acting as a creator, the creator) takes part in, most recently active first

SDKlucra.threads.list({ query })

Query parameters

  • limitinteger
  • cursorstring
  • createdAfterstring

    Only items created at or after this time.

  • createdBeforestring

    Only items created before this time.

  • kindenum
    directprogramsupport
  • programprog_…
Response200A page of items, 14 fields each, and nextCursorShow
  • idstring
  • kindenum
    directprogramsupport
  • accountstringnullable
  • programstringnullable
  • supportobjectnullable
    Show 2 child fields
    • statusenum
      waiting_on_lucrawaiting_on_customerresolved
    • resolvedAtstringnullable
  • participantsobject[]
    Show 3 child fields
    • actorobject
      Show 4 child fields
      • idstring
      • typeenum
        organizationcreatorsupport
      • namestringnullable
      • avatarstringnullable
    • lastReadstringnullable
    • joinedAtstring
  • lastMessageobjectnullable
    Show 12 child fields
    • idstring
    • threadstring
    • senderobject
      Show 4 child fields
      • idstring
      • typeenum
        organizationcreatorsupport
      • namestringnullable
      • avatarstringnullable
    • automatedboolean
    • bodystring
    • filesobject[]
      Show 8 child fields
      • idstring
      • namestring
      • kindenum
        imagevideodocument
      • sizenumbernullable
      • widthnumbernullable
      • heightnumbernullable
      • urlstringnullable
      • thumbnailUrlstringnullable
    • replyTostringnullable
    • reactionsobject[]
      Show 2 child fields
      • emojistring
      • actorsstring[]
    • createdAtstring
    • editedAtstringnullable
    • deletedAtstringnullable
    • versioninteger
  • mutedboolean
  • blockedstring[]
  • canSendboolean
  • unreadCountinteger
  • createdAtstring
  • updatedAtstring
  • versioninteger
GET/v1/threads/:id
As creatorread

Get a conversation; its messages are GET /v1/messages?thread=

SDKlucra.threads.retrieve({ path: { id } })

Path parameters

  • idstringrequired
Response20014 fieldsShow
  • idstring
  • kindenum
    directprogramsupport
  • accountstringnullable
  • programstringnullable
  • supportobjectnullable
    Show 2 child fields
    • statusenum
      waiting_on_lucrawaiting_on_customerresolved
    • resolvedAtstringnullable
  • participantsobject[]
    Show 3 child fields
    • actorobject
      Show 4 child fields
      • idstring
      • typeenum
        organizationcreatorsupport
      • namestringnullable
      • avatarstringnullable
    • lastReadstringnullable
    • joinedAtstring
  • lastMessageobjectnullable
    Show 12 child fields
    • idstring
    • threadstring
    • senderobject
      Show 4 child fields
      • idstring
      • typeenum
        organizationcreatorsupport
      • namestringnullable
      • avatarstringnullable
    • automatedboolean
    • bodystring
    • filesobject[]
      Show 8 child fields
      • idstring
      • namestring
      • kindenum
        imagevideodocument
      • sizenumbernullable
      • widthnumbernullable
      • heightnumbernullable
      • urlstringnullable
      • thumbnailUrlstringnullable
    • replyTostringnullable
    • reactionsobject[]
      Show 2 child fields
      • emojistring
      • actorsstring[]
    • createdAtstring
    • editedAtstringnullable
    • deletedAtstringnullable
    • versioninteger
  • mutedboolean
  • blockedstring[]
  • canSendboolean
  • unreadCountinteger
  • createdAtstring
  • updatedAtstring
  • versioninteger