There’s an example of reading data here:
Adding a record would be the same endpoint, but a POST instead of a GET (documentation). I don’t know enough PHP to suggest the exact changes needed.
By the way, there’s a specification of our api here, which could perhaps be used to generate a PHP client using tools such as swagger-codegen.