Hi @Anirudh Dobhal ,
welcome to the Atlassian community!
You can use the following REST Api https://developer.atlassian.com/cloud/confluence/rest/api-group-space/#api-wiki-rest-api-space-spacekey-get
if a space will be returned so there's an existing space with that key.
Hope this helps,
Fabio
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.