# Desk Platform API Create Ticket: Specify Channel URL

**URL:** https://community.sendbird.com/t/desk-platform-api-create-ticket-specify-channel-url/1306
**Category:** Sendbird Desk
**Tags:** platform
**Created:** [November 20, 2020, 10:05pm UTC](https://community.sendbird.com/t/desk-platform-api-create-ticket-specify-channel-url/1306 "2020-11-20T22:05:02Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![bredelman](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/bredelman/32/684_2.png) [@bredelman](https://community.sendbird.com/u/bredelman)
#### Post date: [November 20, 2020, 10:05pm UTC](https://community.sendbird.com/t/desk-platform-api-create-ticket-specify-channel-url/1306/1 "2020-11-20T22:05:02Z")

</div>

According to the Platform API docs I can’t pass the channel URL and it is auto generated. In the app I am working on, we are using the javascript sdk for our react-native app and then the platform API for our backend. Generally the javascript sdk does all the work, but I need to replicate that functionality in python for a certain use case.

The javascript sdk Ticket creation looks like this:

```
SendBirdDesk.Ticket.create(
  channelUrl, // ticket_title
  userId, // user_id
  teamKey, // team_key
  { channel: channelUrl, team: teamKey }, // custom fields
  null, // priority
  (ticket, err) => {})

```

Long story short, we’re doing some internal tracking of the channel URL and so we’re passing it as the custom field and the ticket title.

In the Sendbird Desk dashboard all of our javascript initiated tickets have the channel URL specified above in the custom fields + ticket title. What is actually setting the channel\_url when we do it that way? And how can I duplicate that functionality with the Desk API?

---

<div class="post-metadata">

### Author: ![sardorbek.numonov](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/sardorbek.numonov/32/697_2.png) [@sardorbek.numonov](https://community.sendbird.com/u/sardorbek.numonov)
#### Post date: [November 23, 2020, 1:31am UTC](https://community.sendbird.com/t/desk-platform-api-create-ticket-specify-channel-url/1306/2 "2020-11-23T01:31:50Z")

</div>

Hi @bredelman. As far as I understood, you are creating a channel first, after you get the channel URL, you will update the ticket’s title and custom fields with the channel URL. right?  
But, could you clarify the following question one more time, please?

- What is actually setting the channel\_url when we do it that way?
- How can I duplicate that functionality with the Desk API?

---

<div class="post-metadata">

### Author: ![bredelman](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/bredelman/32/684_2.png) [@bredelman](https://community.sendbird.com/u/bredelman)
#### Post date: [November 23, 2020, 2:11am UTC](https://community.sendbird.com/t/desk-platform-api-create-ticket-specify-channel-url/1306/3 "2020-11-23T02:11:14Z")

</div>

Hey @sardorbek.numonov no we are creating the Ticket first and using the ticket.channel to chat, etc. So we are creating the ticket as described above and the channel URL seems to be set by either the ticket\_title or the custom field. We have a variable, channelUrl, which we’ve predetermined how we want our channels to be named. We have tickets that have been generated with the above code that also have the actual channel\_url set to the channelUrl variable we are passing. The confusing part is that we are passing the ticket\_title and the custom fields, and the channel\_url seems to be auto generated as the exact value of our channelUrl variable. Does that make sense?

So this is desired behavior for us, however it is happening. I would like to understand why the channel\_url is being set that way better so that I can better recreate this logic using the Desk API endpoints. Basically the documentation says that I can’t set the channel URL for either one, but it seems to be happening for the javascript SDK. I haven’t gotten deep enough to know that is the case or not with the Desk API, but knowing how that channel URL is being set will be helpful.

---

<div class="post-metadata">

### Author: ![bredelman](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/bredelman/32/684_2.png) [@bredelman](https://community.sendbird.com/u/bredelman)
#### Post date: [November 23, 2020, 3:20pm UTC](https://community.sendbird.com/t/desk-platform-api-create-ticket-specify-channel-url/1306/4 "2020-11-23T15:20:56Z")

</div>

Sorry I think I see where I am confused. In the desk dashboard there is a spot for ticket fields which I wasn’t really registering as the custom fields. Upon further API inspection the channel URL is not set by me at all and is an auto-generated value different than what I thought it was.

Would it be possible to manually set the channel URL via the desk API and the javascript sdk?

---

<div class="post-metadata">

### Author: ![sardorbek.numonov](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/sardorbek.numonov/32/697_2.png) [@sardorbek.numonov](https://community.sendbird.com/u/sardorbek.numonov)
#### Post date: [December 1, 2020, 12:22am UTC](https://community.sendbird.com/t/desk-platform-api-create-ticket-specify-channel-url/1306/5 "2020-12-01T00:22:29Z")

</div>

Sorry for the late response. I checked with Desk Engineers. Seems that currently, the name of the channel URL is created automatically, now. The customer can not set the name.
