Make sure you have a Verified owner permission to be able to use the Site verification API properly. A verified owner has the highest degree of permissions in Search Console. Verification lasts as long as the Search Console can confirm the presence and validity of your verification token. Search Console periodically checks if your verification token is still present and valid.
Note: Delegated owner - Someone granted ownership status by a verified owner without the use of a verification token. You may also want to check this documentation.
If you have further questions about site verification API, please reach out to our Google Cloud Support.
Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.