Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

delete a customer in jira service desk cloud

Hi

 

I created a customer using REST API 

POST /rest/servicedeskapi/customer

 

I now want to delete the customer (I am testing my methods)

 

I cannot see it under people or customers in my service desk but I get this error whenI use same email etc

This request is invalid. Check that the request contains all the required parameters and that the parameters are valid. (email : An account already exists for this email)

 

How do I delete customers? Preferably via API but if not from backend login?

 

Thanks

1 answer

0 votes

Hi Jason, 

Thank you for reaching out to Atlassian Community!

Just to make sure that we are on the same page, you are using the endpoint below, is that correct?

DELETE /rest/servicedeskapi/servicedesk/{serviceDeskId}/customer

You mentioned that the customer is not showing on the project, can you please go to Administration > Jira Service Desk and check if the customer account is there?
On this screen, you can also delete the customer account.

Regards,
Angélica

Hi where do you put the account id or email or whatever it takes in this call?

 

Thanks

Sorry, I forgot to link the documentation that contains the curl example:

curl --request DELETE \

  --url 'https://your-domain.atlassian.net/rest/servicedeskapi/servicedesk/{serviceDeskId}/customer' \

 --header 'Content-Type: application/json' \

  --data '{

  "accountIds": [

    "qm:a713c8ea-1075-4e30-9d96-891a7d181739:5ad6d3a01db05e2a66fa80bd",

    "qm:a713c8ea-1075-4e30-9d96-891a7d181739:5ad6d69abfa3980ce712caae",

    "qm:a713c8ea-1075-4e30-9d96-891a7d181739:5ad6d3581db05e2a66fa80b"

  ],

  "usernames": [

    "qm:a713c8ea-1075-4e30-9d96-891a7d181739:5ad6d3a01db05e2a66fa80bd",

    "qm:a713c8ea-1075-4e30-9d96-891a7d181739:5ad6d69abfa3980ce712caae",

    "qm:a713c8ea-1075-4e30-9d96-891a7d181739:5ad6d3581db05e2a66fa80b"

  ]

}'

Please, give it a try and let us know how it goes.

Thank you! This is what I needed

Like Angélica Luz likes this

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira Service Desk

The Complete Guide to Atlassian for ITSM

Hi Atlassian Community! This is Teresa from the Atlassian team. My colleague Paul Buffington @Buff and I are excited to share a brand new ITSM resource we’ve created – "The Complete Guide to At...

2,213 views 14 22
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you