Prometheus Remote Write - Opensearch

Hello everyone, I want to send my prometheus data to opensearh using the prometheus remote write feature.
My prometheus configuration is as follows;

 remoteWrite: 
    - url: "https://domain/write"
    remote_timeout: 30s
    queue_config:
      capacity: 10000
      max_shards: 10
      min_shards: 2
      max_samples_per_send: 5000
      batch_send_deadline: 30m
      min_backoff: 50ms
      max_backoff: 1s
    basic_auth:
      username: 'admin'
      password: 'admin'
    tls_config:
      insecure_skip_verify: true

But I get the following error

msg="non-recoverable error" count=2000 exemplarCount=0 err="server returned HTTP status 405 Method Not Allowed: {\"error\":\"Incorrect HTTP method for uri [/write] and method [POST], allowed: [DELETE, HEAD, GET, PUT]\",\"status\":405}"

Can anyone help or have any ideas?