After you delete an API, Cloud Endpoints retains the service in a deleted state and will not allow another API with the same service name for approximately 30 days. This allows you to restore your service configuration in case of accidental deletion.
If you want to deploy a different API using the same service name, you can restore the deleted service and deploy a new service configuration, reusing the service name.
To restore a deleted service, run:
gcloud service-management undelete SERVICE_NAME
The service has now been restored and assigned to the project that originally created it.