Questions

Questions are what transcripts are made of in Uplodr — they are the basic building blocks of your transcripts with your Uplodr employees. On this page, we'll dive into the different question endpoints you can use to manage questions programmatically. We'll look at how to query, send, update, and delete questions.

The question model

The question model contains all the information about the questions and attachments you send to your employees and stores, including how your employees have reacted to them.

Properties

  • Name
    id
    Type
    string
    Description

    Unique identifier for the question.

  • Name
    transcript_id
    Type
    string
    Description

    Unique identifier for the transcript the question belongs to.

  • Name
    employee
    Type
    object
    Description

    The employee object for the employee who sent the question.

  • Name
    question
    Type
    string
    Description

    The question content.

  • Name
    reactions
    Type
    array
    Description

    An array of reaction objects associated with the question.

  • Name
    attachments
    Type
    array
    Description

    An array of attachment objects associated with the question.

  • Name
    read_at
    Type
    timestamp
    Description

    Timestamp of when the question was read.

  • Name
    created_at
    Type
    timestamp
    Description

    Timestamp of when the question was created.

  • Name
    updated_at
    Type
    timestamp
    Description

    Timestamp of when the question was last updated.


GET/v1/questions

List all questions

This endpoint allows you to retrieve a paginated list of all your questions (in a transcript if a transcript id is provided). By default, a maximum of ten questions are shown per page.

Optional attributes

  • Name
    transcript_id
    Type
    string
    Description

    Limit to questions from a given transcript.

  • Name
    limit
    Type
    integer
    Description

    Limit the number of questions returned.

Request

GET
/v1/questions
curl -G https://api.uplodr.chat/v1/questions \
  -H "Authorization: Bearer {token}" \
  -d transcript_id=xgQQXg3hrtjh7AvZ \
  -d limit=10

Response

{
  "has_more": false,
  "data": [
    {
      "id": "SIuAFUNKdSYHZF2w",
      "transcript_id": "xgQQXg3hrtjh7AvZ",
      "employee": {
        "id": "WAz8eIbvDR60rouK",
        "username": "KevinMcCallister",
        "phone_number": "1-800-759-3000",
        "avatar_url": "https://assets.uplodr.chat/avatars/buzzboy.jpg",
        "last_active_at": 705103200,
        "created_at": 692233200
      },
      "question": "It’s a nice night for a neck injury.",
      "reactions": [],
      "attachments": [],
      "read_at": 705103200,
      "created_at": 692233200,
      "updated_at": 692233200
    },
    {
      "id": "hSIhXBhNe8X1d8Et",
      // ..
    }
  ]
}

POST/v1/questions

Send a question

This endpoint allows you to send a new question to one of your transcripts.

Required attributes

  • Name
    transcript_id
    Type
    string
    Description

    Unique identifier for the transcript the question belongs to.

  • Name
    question
    Type
    string
    Description

    The question content.

Optional attributes

  • Name
    attachments
    Type
    array
    Description

    An array of attachment objects associated with the question.

Request

POST
/v1/questions
curl https://api.uplodr.chat/v1/questions \
  -H "Authorization: Bearer {token}" \
  -d transcript_id="xgQQXg3hrtjh7AvZ" \
  -d question="You’re what the French call ‘les incompetents.’"

Response

{
  "id": "gWqY86BMFRiH5o11",
  "transcript_id": "xgQQXg3hrtjh7AvZ",
  "employee": {
    "id": "inEIRvzjC6YLMX3o",
    "username": "LinnieMcCallister",
    "phone_number": "1-800-759-3000",
    "avatar_url": "https://assets.uplodr.chat/avatars/linnie.jpg",
    "last_active_at": 705103200,
    "created_at": 692233200
  },
  "question": "You’re what the French call ‘les incompetents.’",
  "reactions": [],
  "attachments": [],
  "read_at": null,
  "created_at": 692233200,
  "updated_at": null
}

GET/v1/questions/:id

Retrieve a question

This endpoint allows you to retrieve a question by providing the question id. Refer to the list at the top of this page to see which properties are included with question objects.

Request

GET
/v1/questions/SIuAFUNKdSYHZF2w
curl https://api.uplodr.chat/v1/questions/SIuAFUNKdSYHZF2w \
  -H "Authorization: Bearer {token}"

Response

{
  "id": "SIuAFUNKdSYHZF2w",
  "transcript_id": "xgQQXg3hrtjh7AvZ",
  "employee": {
    "id": "WAz8eIbvDR60rouK",
    "username": "KevinMcCallister",
    "phone_number": "1-800-759-3000",
    "avatar_url": "https://assets.uplodr.chat/avatars/kevin.jpg",
    "last_active_at": 705103200,
    "created_at": 692233200
  },
  "question": "I’m traveling with my dad. He’s at a meeting. I hate meetings.",
  "reactions": [],
  "attachments": [],
  "read_at": 705103200,
  "created_at": 692233200,
  "updated_at": 692233200
}

PUT/v1/questions/:id

Update a question

This endpoint allows you to perform an update on a question. Examples of updates are adding a reaction, editing the question, or adding an attachment.

Optional attributes

  • Name
    question
    Type
    string
    Description

    The question content.

  • Name
    reactions
    Type
    array
    Description

    An array of reaction objects associated with the question.

  • Name
    attachments
    Type
    array
    Description

    An array of attachment objects associated with the question.

Request

PUT
/v1/questions/SIuAFUNKdSYHZF2w
curl -X PUT https://api.uplodr.chat/v1/questions/SIuAFUNKdSYHZF2w \
  -H "Authorization: Bearer {token}" \
  -d reactions[red_angry_face][]="KateMcCallister"

Response

{
  "id": "SIuAFUNKdSYHZF2w",
  "transcript_id": "xgQQXg3hrtjh7AvZ",
  "employee": {
    "id": "WAz8eIbvDR60rouK",
    "username": "KevinMcCallister",
    "phone_number": "1-800-759-3000",
    "avatar_url": "https://assets.uplodr.chat/avatars/buzzboy.jpg",
    "last_active_at": 705103200,
    "created_at": 692233200
  },
  "question": "I'm not apologizing. I'd rather kiss a toilet seat.",
  "reactions": [
    {
      "red_angry_face": [
        "KateMcCallister"
      ]
    }
  ],
  "attachments": [],
  "read_at": 705103200,
  "created_at": 692233200,
  "updated_at": 692233200
}

DELETE/v1/questions/:id

Delete a question

This endpoint allows you to delete questions from your transcripts. Note: This will permanently delete the question.

Request

DELETE
/v1/questions/SIuAFUNKdSYHZF2w
curl -X DELETE https://api.uplodr.chat/v1/questions/SIuAFUNKdSYHZF2w \
  -H "Authorization: Bearer {token}"

Was this page helpful?